◆ addEntryAtPath:ofType:withArgument:
- (void) addEntryAtPath: |
|
(NSString *) | aPath |
ofType: |
|
(NSString *) | aFileType |
withArgument: |
|
(NSString *) | anArgument |
Adds an entry at ‘aPath’ with the file type set to ‘aFileType’.
In case the created file is a link, ‘anArgument’ should contain the link's target.
◆ categoryContentsArrayAtPath:
- (NSMutableArray *) categoryContentsArrayAtPath: |
|
(NSString *) | aPath |
|
Returns the contents array of the category at path ‘aPath’.
- Returns
- the category's contents array if it is found, or ‘nil’ if it isn't.
◆ copyCategoryAtPath:toPath:error:
- (BOOL) copyCategoryAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Copies a category recursively in the project.
- Parameters
-
aPath | The path from which to copy the category. |
newPath | The path to which to copy the category. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ copyLinkAtPath:toPath:error:
- (BOOL) copyLinkAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Copies a link in the project.
- Parameters
-
aPath | The path from which to copy the link. |
newPath | The path to which to copy the link. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ copyPlainFileAtPath:toPath:error:
- (BOOL) copyPlainFileAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Copies a plain file in the project.
- Parameters
-
aPath | The path from which to copy the file. |
newPath | The path to which to copy the file. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ fileEntryAtPath:
- (NSMutableDictionary *) fileEntryAtPath: |
|
(NSString *) | aPath |
|
Returns the file entry which represents ‘aPath’ in the file management dictionary.
- Returns
- the entry if it is found, or ‘nil’ if it isn't.
◆ makeNewUniqueNameFromBasename:pathExtension:inCategory:andDirectory:
- (NSString *) makeNewUniqueNameFromBasename: |
|
(NSString *) | basename |
pathExtension: |
|
(NSString *) | ext |
inCategory: |
|
(NSString *) | category |
andDirectory: |
|
(NSString *) | directory |
Makes a new name from ‘basename’ so that it is unique in ‘category’ and ‘directory’.
E.g. basename = "New File", then the method will
check whether
@"New File"
@"New File 1"
@"New File 2" ... is unique in the provided category and directory. The first of these names which already is unique will be returned.
◆ moveCategoryAtPath:toPath:error:
- (BOOL) moveCategoryAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Moves a category recursively in the project.
- Parameters
-
aPath | The path from which to move the category. |
newPath | The path to which to move the category. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ moveLinkAtPath:toPath:error:
- (BOOL) moveLinkAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Moves a link in the project.
The link's target will be recomputed in order to keep the link valid.
- Parameters
-
aPath | The path from which to move the link. |
newPath | The path to which to move the link. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ movePlainFileAtPath:toPath:error:
- (BOOL) movePlainFileAtPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Moves a plain file in the project.
- Parameters
-
aPath | The path from which to move the file. |
newPath | The path to which to move the file. |
error | A pointer to an NSError variable which will be filled with an error in description in case an error occurs during the operation. |
- Returns
- YES if the operation succeeds, NO if it doesn't.
◆ performFileClashCheckFromPath:toPath:error:
- (BOOL) performFileClashCheckFromPath: |
|
(NSString *) | aPath |
toPath: |
|
(NSString *) | newPath |
error: |
|
(NSError **) | error |
Performs a check whether the file at path ‘aPath’ doesn't clash with an file if it were to exist at path ‘newPath’.
For the various file types this means:
- virtual files: check whether the file doesn't already exist in the destination category
- plain files and links: same as for virtual files, and additionally check that there's no underlying disk file in the way
- categories: same as for virtual files, and additionally perform this method for all it's descendents recursively
- Returns
- YES if there is no clash, NO if there is one.
◆ recursivelyLocateFileAtPhysicalPath:inCategory:
- (NSString *) recursivelyLocateFileAtPhysicalPath: |
|
(NSString *) | diskLocation |
inCategory: |
|
(NSString *) | aCategory |
This method recursively searches for a file based on it's physical on-disk location in a certain category and it's descendents.
- Parameters
-
diskLocation | The physical location of the file. |
aCategory | The category in which to recursively look for the file. |
- Returns
- An in-project path to a file who's physical location is that indicated by the first argument. If no such file exists in the project, ‘nil’ is returned instead.
◆ removeEntryAtPath:
- (void) removeEntryAtPath: |
|
(NSString *) | aPath |
|
Removes a file system dictionary entry.
- Parameters
-
aPath | A path to the file who's entry to remove. |
◆ validateAction:
- (BOOL) validateAction: |
|
(SEL) | action |
|
Validates an action.
This is used to unify validation of toolbar items and menu items into a single routine.
- Parameters
-
action | The action which to validate. |
- Returns
- YES if the action is valid, NO if it isn't.
The documentation for this category was generated from the following file:
- ProjectModules/FileManager/FileManager.m