ObjFW
|
A class which provides functions to read, write and manipulate files. More...
#include <OFFile.h>
A class which provides functions to read, write and manipulate files.
void OFFile::changeModeOfFile:toMode: | ( | OFString* | path, |
[toMode] mode_t | mode | ||
) | [static, virtual] |
Changes the mode of a file.
Only changes read-only flag on Windows.
path | The path to the file of which the mode should be changed as a string |
mode | The new mode for the file |
void OFFile::changeOwnerOfFile:toOwner:group: | ( | OFString* | path, |
[toOwner] OFString* | owner, | ||
[group] OFString* | group | ||
) | [static, virtual] |
Changes the owner of a file.
Not available on Windows.
path | The path to the file of which the owner should be changed as a string |
owner | The new owner for the file |
group | The new group for the file |
void OFFile::changeToDirectory: | ( | OFString* | path | ) | [static, virtual] |
Changes the current working directory.
path | The new directory to change to |
Copies a file.
from | The file to copy |
to | The destination path |
void OFFile::createDirectoryAtPath: | ( | OFString* | path | ) | [static, virtual] |
Creates a directory at the specified path.
path | The path of the directory |
OFString * OFFile::currentDirectoryPath | ( | ) | [static, virtual] |
void OFFile::deleteDirectoryAtPath: | ( | OFString* | path | ) | [static, virtual] |
Deletes an empty directory.
path | The path to the directory which should be deleted as a string |
void OFFile::deleteFileAtPath: | ( | OFString* | path | ) | [static, virtual] |
Deletes a file.
path | The path to the file of which should be deleted as a string |
BOOL OFFile::directoryExistsAtPath: | ( | OFString* | path | ) | [static, virtual] |
path | The path to check |
BOOL OFFile::fileExistsAtPath: | ( | OFString* | path | ) | [static, virtual] |
path | The path to check |
path | The path of the directory |
id OFFile::fileWithFileDescriptor: | ( | int | fd | ) | [static, virtual] |
path | The path to the file to open as a string |
mode | The mode in which the file should be opened as a string |
id OFFile::initWithFileDescriptor: | ( | int | fd | ) | [virtual] |
Hardlinks a file.
Not available on Windows.
src | The path to the file of which should be linked as a string |
dest | The path to where the file should be linked as a string |
Renames a file.
from | The file to rename |
to | The new name |
Symlinks a file.
Not available on Windows.
src | The path to the file of which should be symlinked as a string |
dest | The path to where the file should be symlinked as a string |