A class which provides functions to read, write and manipulate files. More...
#import <OFFile.h>
Public Member Functions | |
(id) | - initWithPath:mode: |
(id) | - initWithFilePointer: |
Static Public Member Functions | |
(id) | + fileWithPath:mode: |
(id) | + fileWithFilePointer: |
(void) | + changeModeOfFile:toMode: |
(void) | + changeOwnerOfFile:toOwner:group: |
(void) | + rename:to: |
(void) | + delete: |
(void) | + link:to: |
(void) | + symlink:to: |
Protected Attributes | |
FILE * | fp |
BOOL | close |
A class which provides functions to read, write and manipulate files.
+ (void) changeModeOfFile: | (OFString*) | path | ||
toMode: | (mode_t) | mode | ||
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) changeOwnerOfFile: | (OFString*) | path | ||
toOwner: | (uid_t) | owner | ||
group: | (gid_t) | group | ||
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) delete: | (OFString*) | path |
Deletes a file.
path | The path to the file of which should be deleted as a string |
+ (id) fileWithFilePointer: | (FILE*) | fp |
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) initWithFilePointer: | (FILE*) | fp |
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 |