# PHYSFS_File

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


### close() <sub>function</sub>

Close this file handle. Throws on error.



**Returns**: None


### write(data) <sub>function</sub>

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



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


**Returns**: None


### buffer(size) <sub>function</sub>

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



**size**: Size in bytes of the buffer.


**Returns**: None


### tell() <sub>function</sub>

Return the current position in the file.



**Returns**: A numeric offset.


### eof() <sub>function</sub>

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



**Returns**: True if at EOF, false otherwise.

