![]() |
libgpac
Documentation of the core library of GPAC
|
import <core.idl;
Public Member Functions | |
| File () | |
| File (DOMString name, DOMString mode, optional DOMString parent_fileio=null) | |
| void | flush () |
| void | close () |
| unsigned long | read (ArrayBuffer buf, optional unsigned long nb_bytes=0) |
| long | seek (unsigned long long offset, long whence) |
| DOMString | gets () |
| DOMString | getc (DOMString char) |
| unsigned long | write (ArrayBuffer buf, optional unsigned long nb_bytes=0) |
| void | puts (DOMString string) |
| void | putc (DOMString value) |
| void | putc (unsigned long value) |
Data Fields | |
| attribute unsigned long long | pos |
| attribute readonly boolean | eof |
| attribute readonly unsigned long | error |
| attribute readonly unsigned long long | size |
| attribute readonly boolean | gfio |
FILE object
| File::File | ( | ) |
constructor for a temporary file
constructor for a file - see gf_fopen
| name | name of file to open |
| mode | read/write mode, same as fopen |
| parent_fileio | parent GF_FileIO name - see gf_fopen_ex |
| void File::flush | ( | ) |
flush file - see gf_fflush
| void File::close | ( | ) |
close file, underlying FILE object is destroyed and any futher calls to the file object will fail - see gf_fclose
| unsigned long File::read | ( | ArrayBuffer | buf, |
| optional unsigned long | nb_bytes = 0 |
||
| ) |
read bytes in an array buffer - see gf_fread
| buf | array buffer to read bytes into |
| nb_bytes | number of bytes to read - if 0, uses array buffer size. If more than array buffer size, truncated to array buffer size |
| long File::seek | ( | unsigned long long | offset, |
| long | whence | ||
| ) |
seek into file - see gf_fseek
| offset | offset in file |
| whence | seek origin |
| DOMString File::gets | ( | ) |
get a string from a file, stopping at first new line character found - see gf_fgets
read a character from file - see gf_fgetc
| unsigned long File::write | ( | ArrayBuffer | buf, |
| optional unsigned long | nb_bytes = 0 |
||
| ) |
write bytes of an array buffer to file - see gf_fwrite
| buf | array buffer to read bytes from |
| nb_bytes | number of bytes to write - if 0, uses array buffer size. If more than array buffer size, truncated to array buffer size |
| void File::puts | ( | DOMString | string | ) |
put string to file - see gf_fputs
| string | string to write |
| void File::putc | ( | DOMString | value | ) |
put character to file - see gf_fputc
| value | character to write (only first char of string is used) |
| void File::putc | ( | unsigned long | value | ) |
put character to file - see gf_fputc
| value | integer value to write |
| attribute readonly boolean File::eof |
EOF flag on file - see gf_feof
| attribute readonly unsigned long File::error |
error code on file, 0 if no error - see gf_ferror
| attribute readonly unsigned long long File::size |
file size - see gf_fsize
| attribute readonly boolean File::gfio |
set to true if file is a GFIO wrapper - see gf_fileio_check