A class which provides functions to read, write and manipulate files.
More...
#import <OFFile.h>
List of all members.
Detailed Description
A class which provides functions to read, write and manipulate files.
Member Function Documentation
+ (void) changeModeOfFile: |
|
(OFString*) |
path |
toMode: |
|
(mode_t) |
mode | |
|
|
| | |
Changes the mode of a file.
Only changes read-only flag on Windows.
- Parameters:
-
| path | The path to the file of which the mode should be changed as a string |
| mode | The new mode for the file |
Changes the owner of a file.
Not available on Windows.
- Parameters:
-
| 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) changeToDirectory: |
|
(OFString*) |
path |
|
|
Changes the current working directory.
- Parameters:
-
| path | The new directory to change to |
Copies a file.
- Parameters:
-
| from | The file to copy |
| to | The destination path |
+ (void) createDirectoryAtPath: |
|
(OFString*) |
path |
|
|
Creates a directory at the specified path.
- Parameters:
-
| path | The path of the directory |
- Returns:
- The path of the current working directory
+ (void) deleteDirectoryAtPath: |
|
(OFString*) |
path |
|
|
Deletes an empty directory.
- Parameters:
-
| path | The path to the directory which should be deleted as a string |
+ (void) deleteFileAtPath: |
|
(OFString*) |
path |
|
|
Deletes a file.
- Parameters:
-
| path | The path to the file of which should be deleted as a string |
+ (BOOL) directoryExistsAtPath: |
|
(OFString*) |
path |
|
|
- Parameters:
-
- Returns:
- A boolean whether there is a directory at the specified path
+ (BOOL) fileExistsAtPath: |
|
(OFString*) |
path |
|
|
- Parameters:
-
- Returns:
- A boolean whether there is a file at the specified path
- Parameters:
-
| path | The path of the directory |
- Returns:
- An array of OFStrings with the files at the specified path
+ (id) fileWithFileDescriptor: |
|
(int) |
fd |
|
|
- Parameters:
-
| fd | A file descriptor, returned from for example open(). It is not closed when the OFFile object is deallocated! |
- Returns:
- A new autoreleased OFFile
- Parameters:
-
| path | The path to the file to open as a string |
| mode | The mode in which the file should be opened as a string |
- Returns:
- A new autoreleased OFFile
- (id) initWithFileDescriptor: |
|
(int) |
fd |
|
|
Initializes an already allocated OFFile.
- Parameters:
-
| fd | A file descriptor, returned from for example open(). It is not closed when the OFFile object is deallocated! |
Initializes an already allocated OFFile.
- Parameters:
-
| path | The path to the file to open as a string |
| mode | The mode in which the file should be opened as a string |
- Returns:
- An initialized OFFile
Hardlinks a file.
Not available on Windows.
- Parameters:
-
| 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 |
- Returns:
- The date of the last modification of the file
Renames a file.
- Parameters:
-
| from | The file to rename |
| to | The new name |
Symlinks a file.
Not available on Windows.
- Parameters:
-
| 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 |
The documentation for this class was generated from the following files: