Learn R Programming

freesurferformats (version 1.1.0)

transform.file.sniff.text: Extract the text of a file for format sniffing.

Description

Read the beginning of a file and return the printable characters it contains, so that the file can be identified by markers in its content without failing on binary data.

Usage

# S3 method for file.sniff.text
transform(filepath, num_bytes = 256L)

Value

character string, the printable characters of the beginning of the file.

Arguments

filepath

character string, the path to the file.

num_bytes

integer, the number of bytes to inspect.