|
ProjectManager 0.2
|
Instance Methods | |
| (BOOL) | - validateAction: |
| Validates an action. | |
| (NSMutableDictionary *) | - fileEntryAtPath: |
| Returns the file entry which represents ‘aPath’ in the file management dictionary. | |
| (NSMutableArray *) | - categoryContentsArrayAtPath: |
| Returns the contents array of the category at path ‘aPath’. | |
| (BOOL) | - copyPlainFileAtPath:toPath:error: |
| Copies a plain file in the project. | |
| (BOOL) | - copyLinkAtPath:toPath:error: |
| Copies a link in the project. | |
| (BOOL) | - copyCategoryAtPath:toPath:error: |
| Copies a category recursively in the project. | |
| (BOOL) | - movePlainFileAtPath:toPath:error: |
| Moves a plain file in the project. | |
| (BOOL) | - moveLinkAtPath:toPath:error: |
| Moves a link in the project. | |
| (BOOL) | - moveCategoryAtPath:toPath:error: |
| Moves a category recursively in the project. | |
| (BOOL) | - performFileClashCheckFromPath:toPath:error: |
| Performs a check whether the file at path ‘aPath’ doesn't clash with an file if it were to exist at path ‘newPath’. | |
| (void) | - addEntryAtPath:ofType:withArgument: |
| Adds an entry at ‘aPath’ with the file type set to ‘aFileType’. | |
| (void) | - removeEntryAtPath: |
| Removes a file system dictionary entry. | |
| (NSString *) | - makeNewUniqueNameFromBasename:pathExtension:inCategory:andDirectory: |
| Makes a new name from ‘basename’ so that it is unique in ‘category’ and ‘directory’. | |
| (NSString *) | - recursivelyLocateFileAtPhysicalPath:inCategory: |
| This method recursively searches for a file based on it's physical on-disk location in a certain category and it's descendents. | |
| (NSString *) | - internalTypeOfFileAtPath: |
| (BOOL) | - internalImportFile:renameTo:toPath:link:error: |
| The actual implementation of the -[FileManager importFile:renameTo:toPath:link:error:] method. | |
| - (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.
References categoryContentsArrayAtPath:.
Referenced by copyCategoryAtPath:toPath:error:, copyLinkAtPath:toPath:error:, copyPlainFileAtPath:toPath:error:, moveCategoryAtPath:toPath:error:, moveLinkAtPath:toPath:error:, and movePlainFileAtPath:toPath:error:.
| - (NSMutableArray *) categoryContentsArrayAtPath: | (NSString *) | aPath |
Returns the contents array of the category at path ‘aPath’.
Referenced by addEntryAtPath:ofType:withArgument:, fileEntryAtPath:, and removeEntryAtPath:.
| - (BOOL) copyCategoryAtPath: | (NSString *) | aPath | |
| toPath: | (NSString *) | newPath | |
| error: | (NSError **) | error |
Copies a category recursively in the project.
| 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. |
References addEntryAtPath:ofType:withArgument:.
| - (BOOL) copyLinkAtPath: | (NSString *) | aPath | |
| toPath: | (NSString *) | newPath | |
| error: | (NSError **) | error |
Copies a link in the project.
| 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. |
References addEntryAtPath:ofType:withArgument:.
| - (BOOL) copyPlainFileAtPath: | (NSString *) | aPath | |
| toPath: | (NSString *) | newPath | |
| error: | (NSError **) | error |
Copies a plain file in the project.
| 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. |
References addEntryAtPath:ofType:withArgument:.
| - (NSMutableDictionary *) fileEntryAtPath: | (NSString *) | aPath |
Returns the file entry which represents ‘aPath’ in the file management dictionary.
References categoryContentsArrayAtPath:.
| - (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.
| - (BOOL) moveCategoryAtPath: | (NSString *) | aPath | |
| toPath: | (NSString *) | newPath | |
| error: | (NSError **) | error |
Moves a category recursively in the project.
| 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. |
References addEntryAtPath:ofType:withArgument:, and removeEntryAtPath:.
| - (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.
| 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. |
References addEntryAtPath:ofType:withArgument:, and removeEntryAtPath:.
| - (BOOL) movePlainFileAtPath: | (NSString *) | aPath | |
| toPath: | (NSString *) | newPath | |
| error: | (NSError **) | error |
Moves a plain file in the project.
| 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. |
References addEntryAtPath:ofType:withArgument:, and removeEntryAtPath:.
| - (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:
| - (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.
| diskLocation | The physical location of the file. |
| aCategory | The category in which to recursively look for the file. |
References recursivelyLocateFileAtPhysicalPath:inCategory:.
Referenced by recursivelyLocateFileAtPhysicalPath:inCategory:.
| - (void) removeEntryAtPath: | (NSString *) | aPath |
Removes a file system dictionary entry.
| aPath | A path to the file who's entry to remove. |
References categoryContentsArrayAtPath:.
Referenced by moveCategoryAtPath:toPath:error:, moveLinkAtPath:toPath:error:, and movePlainFileAtPath:toPath:error:.
| - (BOOL) validateAction: | (SEL) | action |
Validates an action.
This is used to unify validation of toolbar items and menu items into a single routine.
| action | The action which to validate. |