Releases the native resources associated with this object.
Releases the native resources associated with this object.
Closes this file IO object and releases any resources associated with it.
Path to a file.
Flushes the file.
Flushes the file. This only ensures that the data has made its way out of the process without any guarantees on whether it is written to disk. This means that the data would survive an application crash but not necessarily an OS crash.
Returns an iterator over the lines in this file (including the new-line character at the end of each line).
Mode in which to open the file.
Returns the contents of the file as a string, starting from current position in the file.
Returns the contents of the file as a string, starting from current position in the file.
Number of bytes to read from the file. If equal to -1
(the default) then the file is read up to
its end.
Read contents of the file as a string.
Buffer size used when reading from the file.
Reads the next line from the file and returns it (including the new-line character at the end).
Reads all the lines from the file and returns them (including the new-line character at the end of each line).
Seeks to the provided offset in the file.
Seeks to the provided offset in the file.
Position offset.
Position reference, relative to which offset
is defined.
Returns the size of the file.
Returns the current position in the file.
Appends content
to the end of the file.
Helper class used for reading from and writing to a file.
IMPORTANT:
FileIO.close()
needs to be called after being done with this object in order to prevent memory leaks. The memory will not be automatically freed, like its done for tensors and graphs.Path to a file.
Mode in which to open the file.
Buffer size used when reading from the file.