Skip to content

PHYSFS_File

A file handle opened via PhysFS for writing or reading. Freed automatically when references go away.

close() function

Close this file handle. Throws on error.

Returns: None

write(data) function

Write data (string or ArrayBuffer) to the file. Throws on error.

data: The data to write (string or ArrayBuffer).

Returns: None

buffer(size) function

Enable an internal write buffer of the given size on this file.

size: Size in bytes of the buffer.

Returns: None

tell() function

Return the current position in the file.

Returns: A numeric offset.

eof() function

Return whether the file pointer is at end-of-file.

Returns: True if at EOF, false otherwise.