![]() |
libgpac
Documentation of the core library of GPAC
|
import <nodejs.idl;
Public Member Functions | |
| boolean | open (DOMString URL, DOMString mode, _FileIO parent) |
| void | close () |
| unsigned long | read (Uint8Array buffer) |
| unsigned long | write (Uint8Array buffer) |
| unsigned long | seek (unsigned long long position, unsigned long whence) |
| unsigned long long | tell () |
| boolean | eof () |
| boolean | exists (DOMString URL) |
interface object for file IO
open a URL
| URL | the final URL to open |
| mode | the open mode as in gf_fopen |
| parent | the parent _FileIO object |
this being the new object. The object will be kept live until the file is closed.| void _FileIOFactory::close | ( | ) |
close the file object
| unsigned long _FileIOFactory::read | ( | Uint8Array | buffer | ) |
read the file object from its current position
| buffer | the buffer to read |
This callback can be omitted for write-only files
| unsigned long _FileIOFactory::write | ( | Uint8Array | buffer | ) |
write the file object from its current position
| buffer | the buffer to read |
This callback can be omitted for read-only files
| unsigned long _FileIOFactory::seek | ( | unsigned long long | position, |
| unsigned long | whence | ||
| ) |
seek the file object - see gf_fseek
| position | the position in the file |
| whence | the offset in the file (0: begin, 1: current position, 2: end) |
| unsigned long long _FileIOFactory::tell | ( | ) |
get position in the file object - see gf_ftell
| boolean _FileIOFactory::eof | ( | ) |
check if file position is at end of file - see gf_feof
| boolean _FileIOFactory::exists | ( | DOMString | URL | ) |
check if the given file exists - see gf_file_exists
| URL | the final URL to open |