ProjectManager 0.2
|
Instance Methods | |
(id) | - delegate |
(void) | - openFile: |
(void) | - browser:createRowsForColumn:inMatrix: |
(NSString *) | - browser:titleOfColumn: |
(void) | - selectFile: |
(void) | - changeName: |
Action sent when the selected file's name in the fileName text field is edited by the user. | |
(void) | - selectAndEditNameAtPath: |
Instructs the browser to set it's path to ‘aPath’, selects name of the entry in the fileName text field and allows the user to edit it. | |
(NSArray *) | - selectedFiles |
Returns the paths to the files that are currently selected, otherwise nil. | |
(NSString *) | - containingCategory |
Returns a path to the category which contains the current selection. | |
(BOOL) | - performDragOperation: |
Instructs the file manager to perform a drag operation. | |
(BOOL) | - openPath: |
Opens the file at ‘aPath’. | |
(BOOL) | - fileExistsAtPath: |
Determines whether a file exists at ‘aPath’. | |
(NSArray *) | - filesAtPath: |
Lists the files contained in the category at path ‘category’. | |
(FMFileType) | - typeOfFileAtPath: |
Queries the file type at path ‘aPath’. | |
(NSString *) | - targetOfLinkAtPath: |
Queries the target of the link at path ‘aPath’. | |
(unsigned long long) | - measureDiskUsageAtPath: |
Measures the disk usage of files at and under path ‘aPath’. | |
(NSString *) | - pathToFileAtPhysicalPath: |
Attempts to locate a file in the project based on it's physical disk location. | |
(NSArray *) | - filesAtPath:ofType:recursive: |
Returns a list of files of a specified type in a category. | |
(BOOL) | - importFile:toPath:link:error: |
A shorthand for -[FileManager importFile:renameTo:toPath:link:error:] with the rename filename being the same as the original file path. | |
(BOOL) | - importFile:renameTo:toPath:link:error: |
Imports a specified on-disk file into the project. | |
(BOOL) | - createCategory:atPath:error: |
Creates an empty category named ‘categoryName’ in category ‘category’. | |
(BOOL) | - createCategoryAndIntermediateCategories:error: |
If necessary, creates a category and all intermediate category nodes on the way to it. | |
(BOOL) | - createVirtualFileNamed:atPath:error: |
Creates a virtual file named ‘filename’ in category ‘category’. | |
(BOOL) | - removePath:delete:error: |
Removes the specified file at ‘aPath’. | |
(BOOL) | - copyPath:toPath:error: |
Copies a specified file to a new location. | |
(BOOL) | - movePath:toPath:error: |
Moves a specified file to a new location. | |
(BOOL) | - linkPath:fromPath:error: |
Links a specified file from a new location. | |
(NSImage *) | - iconForPath: |
Returns an iconic representation of ‘aPath’. | |
(void) | - importFiles: |
(void) | - newEmptyFile: |
(void) | - newFileFromTemplate: |
(void) | - newCategory: |
(void) | - deleteFiles: |
(void) | - filesChanged: |
(void) | - projectNameChanged: |
![]() | |
(id) | - initWithDocument:infoDictionary: |
Designated initializer of project modules. | |
(void) | - finishInit |
Finishes the initialization process of the project module. | |
(ProjectDocument *) | - document |
Should return the owner project document to which this project module belongs to. | |
(NSView *) | - view |
Instructs the project module to return a view which will be put into the project's window this module becomes the current module. | |
(NSDictionary *) | - infoDictionary |
Instructs the project module to return an archivable version of it's data that it wishes to be saved together with the project. | |
(BOOL) | - regenerateDerivedFiles |
Sent to the project module when it is to regenerate it's derived files which are generated from other files/data in the project itself. | |
(NSArray *) | - moduleMenuItems |
Should return an array of NSMenuItem's which will be put into the module's submenu. | |
(NSArray *) | - toolbarItemIdentifiers |
A module should return the default toolbar item identifiers for it's toolbar. | |
(NSToolbarItem *) | - toolbarItemForItemIdentifier: |
This method asks the module to create a toolbar item for the provided itemIdentifier. | |
(BOOL) | - validateToolbarItem: |
This method is invoked when the project type object is required to validate it's toolbar items. | |
Protected Attributes | |
id | view |
id | bogusWindow |
ProjectBrowser * | browser |
ProjectImageView * | fileIcon |
NSTextField * | fileNameField |
NSTextField * | filePathField |
NSTextField * | fileSizeField |
NSTextField * | fileTypeField |
NSTextField * | lastModifiedField |
NSMutableArray * | files |
id< FileManagerDelegate > | delegate |
ProjectDocument * | document |
Additional Inherited Members | |
![]() | |
(NSString *) | + moduleName |
Should return a unique module identifier name. | |
(NSString *) | + humanReadableModuleName |
- (BOOL) copyPath: | (NSString *) | aPath | |
toPath: | (NSString *) | newPath | |
error: | (NSError **) | error |
Copies a specified file to a new location.
- (BOOL) createCategory: | (NSString *) | categoryName | |
atPath: | (NSString *) | category | |
error: | (NSError **) | error |
Creates an empty category named ‘categoryName’ in category ‘category’.
- (BOOL) createCategoryAndIntermediateCategories: | (NSString *) | category | |
error: | (NSError **) | error |
If necessary, creates a category and all intermediate category nodes on the way to it.
category | The category which to create. |
error | A pointer to location which will be set to an NSError object in case an error occurs. |
- (BOOL) createVirtualFileNamed: | (NSString *) | filename | |
atPath: | (NSString *) | category | |
error: | (NSError **) | error |
Creates a virtual file named ‘filename’ in category ‘category’.
- (BOOL) fileExistsAtPath: | (NSString *) | aPath |
Determines whether a file exists at ‘aPath’.
- (NSArray *) filesAtPath: | (NSString *) | category |
Lists the files contained in the category at path ‘category’.
- (NSArray *) filesAtPath: | (NSString *) | aCategory | |
ofType: | (FMFileType) | aFileType | |
recursive: | (BOOL) | recursive |
Returns a list of files of a specified type in a category.
This method looks for the specified file type only, and also allows to specify whether the lookup should be recursive.
- (BOOL) importFile: | (NSString *) | filePath | |
renameTo: | (NSString *) | newName | |
toPath: | (NSString *) | category | |
link: | (BOOL) | linkFlag | |
error: | (NSError **) | error |
Imports a specified on-disk file into the project.
filePath | The on-disk file which to import into the project. |
newName | A filename (only the last path component) to which the imported file will be renamed in the project. |
category | The category into which to import the file. |
linkFlag | If set to NO, the file, if located in an unsuitable location outside the project, will be copied into the path. If YES is passed, it will be linked to without copying. |
error | A pointer to a location which will be set to point to an NSError object in case an error arises during the operation. |
- (BOOL) linkPath: | (NSString *) | aPath | |
fromPath: | (NSString *) | newPath | |
error: | (NSError **) | error |
Links a specified file from a new location.
Only links to plain files and other links are supported.
aPath | The path to which to link. |
newPath | The path where to create the link. |
- (unsigned long long) measureDiskUsageAtPath: | (NSString *) | aPath |
Measures the disk usage of files at and under path ‘aPath’.
- (BOOL) movePath: | (NSString *) | aPath | |
toPath: | (NSString *) | newPath | |
error: | (NSError **) | error |
Moves a specified file to a new location.
aPath | The path from which to move the file. |
newPath | The path to which to move the file. |
error | A pointer to a location which will be filled with an error description in case the operation fails. |
- (BOOL) openPath: | (NSString *) | aPath |
Opens the file at ‘aPath’.
This method is invoked when the user requests to open a file, but the delegate responded that it cannot handle that open request.
- (NSString *) pathToFileAtPhysicalPath: | (NSString *) | diskLocation |
Attempts to locate a file in the project based on it's physical disk location.
This method searches the project's categories for a file which exists at the specified on-disk location and returns the path to it in the project.
diskLocation | The physical location of the file. |
- (BOOL) performDragOperation: | (id <NSDraggingInfo>) | sender |
Instructs the file manager to perform a drag operation.
The drag operation is specified by ‘sender’. The operation source is fully specified by the ‘sender’ argument, the destination is the current file browser path.
- (BOOL) removePath: | (NSString *) | aPath | |
delete: | (BOOL) | deleteFlag | |
error: | (NSError **) | error |
Removes the specified file at ‘aPath’.
Removes the path ‘aPath’, deleting any underlying disk files if ‘deleteFlag’ = YES.
If deleteFlag = YES, then any disk files and links are deleted from disk as well.
- (NSString *) targetOfLinkAtPath: | (NSString *) | aPath |
Queries the target of the link at path ‘aPath’.
- (FMFileType) typeOfFileAtPath: | (NSString *) | aPath |
Queries the file type at path ‘aPath’.