fopen (string filename, string mode="r") |
handle |
Open or create a file named with filename. If parameter mode is not given then the file will be opened with read only permissions, otherwise the modes are equal to PHP/C fopen(): r, r+, w+, a, a+, x, x+ (c, c+, e are not implemented!). For detailed description read PHP file modes. On success the file handle is returned, otherwise null is returned an a warning is shown. The following special filenames are possible: 'v1://stdin' = standard input, 'v1://stdout' = standard output, 'v1://stderr' = standard error |
fwrite (handle file, string string [, number length]) |
number |
Write a string into the given file . If parameter length is not given then the full string is written, otherwise the specified number of bytes are written. On success the number of written bytes is returned, otherwise false is returned and a warning is shown. |
fread (handle file, string& string [, number length=0xFFFF]) |
number |
Read data from the given file into a string variable. The parameter string must be a reference to a variable. If length is not set then it tries to read 64 KB from the file. On success the number of read bytes is returned, otherwise false is returned. |
fgets (handle file) |
string |
Read a line until Ascii 13=\n from file . On success the read line is returned. If the end of file is reached false is returned. |
freadln (handle file, string& string) |
bool |
Read a line until Ascii 13=\n from file into a given string variable. The parameter string must be a reference to a variable. On success true is returned. If the end of file is reached false is returned. |
fclose (handle file) |
bool |
Close the file. On success true is returned. |
feof (handle file) |
bool |
Return true if the end of the file is reached and no more data can be read. |
ftell (handle file) |
number |
Return the current position of file pointer (read bytes). |
fseek (handle file, number position) |
bool |
Set the file pointer to a position beginning from 0. On success true is returned. |
filesize (string filename) |
number |
Return the file size of a given filename. If the file is not found false is returned. |
filemtime (string filename) |
number |
Return timestamp of last modification of filename. If the file is not found false is returned. |
filectime (string filename) |
number |
Return timestamp of creation of filename. If the file is not found false is returned. |
fileatime (string filename) |
number |
Return timestamp of last access of filename. If the file is not found false is returned. |
touch (string filename, number filemtime=time() [, number fileatime]) |
bool |
Set modification time filemtime and optional access time fileatime to filename. On success true is returned. |
file_exists (string path) |
bool |
Return true if a given path is a file or directory. |
is_file (string path) |
bool |
Return true if a given path is a file. |
is_dir (string path) |
bool |
Return true if a given path is a directory. |
filetype (string path) |
string |
Return the type of a given path. Possible return values: 'dir' = Directory; 'file' = File; false = not found |
unlink (string filename) |
bool |
Delete a file named with flename. On success true is returned. |
rename (string fromFilename, string toFilename) |
bool |
Rename (move) a file fromFilename toFilename. On success true is returned. |
copy (string fromFilename, string toFilename) |
bool |
Copy a file fromFilename toFilename. The file will be dublicated. On success true is returned. |
basename (string path) |
string |
Return the base name without directory of a given path. For example: c:\projects\v1\v1.exe will return v1.exe |
dirname (string path) |
string |
Return the directory of a given path. For example: c:\projects\v1\v1.exe will return c:\projects\v1 |
pathinfo (string path) |
array |
Same as PHP pathinfo (). Return an array with information about the given path. For example: c:\projects\v1\v1.exe will return: array ( 'dirname' => 'c:\projects\v1', 'basename' => 'v1.exe', 'extension' => 'exe', 'filename' => 'v1' ) |
realpath (string path) |
string |
Return the absolute system path of a given relative path. For example: ./v1.exe will return c:\projects\v1\v1.exe. realpath() does not work for files with length 0 and non readable files. |
fileno (handle file) |
number |
Return the system file descriptor of the V1 file or socket handle. This number can be given to external native functions. |