Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
    Page
Library
Module
Module type
Parameter
Class
Class type
Source
Ez_file.FileChannelSourceFile operations on the stdlib in_channel/out_channel types
include FileSig.CONTENT_OPERATIONS
  with type in_file := in_channel
   and type out_file = out_channelThe type of a file to which we write: out_channel for FileChannel, string for FileString and FileGen.t for FileGen.
read_file file returns the full content of file. If the file is opened, it is opened in binary mode, no conversion is applied.
write_file file content creates file file with content content. If the file is opened, it is opened in binary mode, no conversion is applied.
read_subfile file pos len returns a string containing len bytes read from file file at pos pos. If the file is opened, it is opened in binary mode. Raises End_of_file if the file is too short.
read_lines file returns the content of file as an array of lines. If the file is opened, it is opened in text mode.
read_lines_to_list file returns the content of file as a list of lines. If the file is opened, it is opened in text mode.
write_lines file lines creates the file file from an array of lines, using FileChannel.output_line for each line.
write_lines file lines creates the file file from a list of lines, using FileChannel.output_line for each line.
read_sublines file pos len returns at most len lines of the file file, starting at line pos. It differs from read_subfile in that it will not raise any exception if the file is too short. Note that it reads the file from beginning everytimes.
Same as read_sublines, but returns a list of strings.
iter_blocks f file reads the content of file file, and calls f buffer len on each chunk. The buffer is reused, and only the first len bytes are from the file. Chunks have a maximal size of 32768.
iter_lines f file calls f line on all the lines line of the file file.
iteri_lines f file calls f line_num line on every line line of the file file, with line_num the line number, starting with line 0.
copy_file src dst copy all the content remaining in file src to file dst.