18 #import "OFSeekableStream.h" 20 OF_ASSUME_NONNULL_BEGIN
22 #if defined(OF_HAVE_CHMOD) && !defined(OF_MORPHOS) 23 # define OF_FILE_MANAGER_SUPPORTS_PERMISSIONS 25 #if defined(OF_HAVE_CHOWN) && !defined(OF_MORPHOS) 26 # define OF_FILE_MANAGER_SUPPORTS_OWNER 28 #if (defined(OF_HAVE_LINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS) 29 # define OF_FILE_MANAGER_SUPPORTS_LINKS 31 #if (defined(OF_HAVE_SYMLINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS) 32 # define OF_FILE_MANAGER_SUPPORTS_SYMLINKS 35 @class OFArray OF_GENERIC(ObjectType);
63 - (bool)fileExistsAtPath: (
OFString *)path;
71 - (bool)directoryExistsAtPath: (
OFString *)path;
73 #ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS 80 - (bool)symbolicLinkExistsAtPath: (
OFString *)path;
88 - (void)createDirectoryAtPath: (
OFString *)path;
96 - (void)createDirectoryAtPath: (
OFString *)path
97 createParents: (
bool)createParents;
114 - (void)changeCurrentDirectoryPath: (
OFString *)path;
123 - (of_offset_t)sizeOfFileAtPath: (
OFString *)path;
154 #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS 166 - (uint16_t)permissionsOfItemAtPath: (
OFString *)path;
180 - (void)changePermissionsOfItemAtPath: (
OFString *)path
181 permissions: (uint16_t)permissions;
184 #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER 192 - (void)getOwner: (
OFString *__autoreleasing _Nonnull *_Nullable)owner
193 group: (
OFString *__autoreleasing _Nonnull *_Nullable)group
205 - (void)changeOwnerOfItemAtPath: (
OFString *)path
223 - (void)copyItemAtPath: (
OFString *)source
239 - (void)moveItemAtPath: (
OFString *)source
249 - (void)removeItemAtPath: (
OFString *)path;
251 #ifdef OF_FILE_MANAGER_SUPPORTS_LINKS 263 - (void)linkItemAtPath: (
OFString *)source
267 #ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS 284 - (void)createSymbolicLinkAtPath: (
OFString *)destination
285 withDestinationPath: (
OFString *)source;
300 OF_ASSUME_NONNULL_END
OFString * currentDirectoryPath()
Returns the path for the current working directory.
Definition: OFFileManager.m:247
A class for handling strings.
Definition: OFString.h:114
OFFileManager * defaultManager()
Returns the default file manager.
Definition: OFFileManager.m:242
The root class for all other classes inside ObjFW.
Definition: OFObject.h:379
A class for storing, accessing and comparing dates.
Definition: OFDate.h:30
An abstract class for storing objects in an array.
Definition: OFArray.h:89
A class which provides management for files, e.g. reading contents of directories, deleting files, renaming files, etc.
Definition: OFFileManager.h:44