ProjectManager  0.2
FileManagerDelegate.h
1 /*
2  FileManagerDelegate.h
3 
4  File manager delegate protocol declaration for the ProjectManager app.
5 
6  Copyright (C) 2006 Saso Kiselkov
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22 
23 #import <Foundation/NSObject.h>
24 
25 @class NSImage, NSString, NSError;
26 
27 typedef enum {
28  FileOpenCannotHandle = -1,
29  FileOpenFailure,
30  FileOpenSuccess
31 } FileOpenResult;
32 
33 typedef enum {
34  FileImportCannotHandle = -1,
35  FileImportFailure,
36  FileImportSuccess
37 } FileImportResult;
38 
44 
49 - (BOOL) canCreateCategoriesAtPath: (NSString *) aPath;
50 
55 - (BOOL) canCreatePlainFilesAtPath: (NSString *) aPath;
56 
61 - (BOOL) canCreateLinksAtPath: (NSString *) aPath;
62 
67 - (BOOL) canCreateVirtualFilesAtPath: (NSString *) aPath;
68 
73 - (BOOL) canDeletePath: (NSString *) aPath;
74 
85 - (FileOpenResult) openFile: (NSString *) aPath;
86 
97 - (NSString *) pathToFile: (NSString *) aPath isCategory: (BOOL) isCategory;
98 
104 - (NSImage *) iconForPath: (NSString *) aPath;
105 
111 - (NSArray *) permissibleFileExtensionsInCategory: (NSString *) aCategory;
112 
130 - (FileImportResult) importFile: (NSString *) aFile
131  intoCategory: (NSString *) aCategory
132  error: (NSError **) error;
133 
180 - (NSString *) pathToFileTemplatesDirectoryForCategory: (NSString *) aCategory;
181 
197 - (NSDictionary *) filesAssociatedWithTemplateFile: (NSString *) aFile
198  fromTemplatesDirectory: (NSString *) templatesDir
199  forCategory: (NSString *) targetCategory;
200 
201 @end
-[FileManager(Private) addEntryAtPath:ofType:withArgument:]
void addEntryAtPath:ofType:withArgument:(NSString *aPath,[ofType] NSString *fileType,[withArgument] NSString *anArgument)
Adds an entry at ‘aPath’ with the file type set to ‘aFileType’.
Definition: FileManager.m:748
ProjectDocument
Definition: ProjectDocument.h:43
-[ProjectModule-p regenerateDerivedFiles]
BOOL regenerateDerivedFiles()
Sent to the project module when it is to regenerate it's derived files which are generated from other...
-[FileManager measureDiskUsageAtPath:]
unsigned long long measureDiskUsageAtPath:(NSString *aPath)
Measures the disk usage of files at and under path ‘aPath’.
Definition: FileManager.m:1682
-[ProjectModule-p infoDictionary]
NSDictionary * infoDictionary()
Instructs the project module to return an archivable version of it's data that it wishes to be saved ...
-[ProjectModule-p moduleMenuItems]
NSArray * moduleMenuItems()
Should return an array of NSMenuItem's which will be put into the module's submenu.
-[ProjectDocument openFile:inCodeEditorOnLine:]
BOOL openFile:inCodeEditorOnLine:(NSString *aPath,[inCodeEditorOnLine] int aLine)
Opens a specified file in a code editor (either the internal code editor, or an external one,...
Definition: ProjectDocument.m:596
-[FileManager(Private) recursivelyLocateFileAtPhysicalPath:inCategory:]
NSString * recursivelyLocateFileAtPhysicalPath:inCategory:(NSString *diskLocation,[inCategory] NSString *aCategory)
This method recursively searches for a file based on it's physical on-disk location in a certain cate...
Definition: FileManager.m:872
-[FileManager(Private) categoryContentsArrayAtPath:]
NSMutableArray * categoryContentsArrayAtPath:(NSString *aPath)
Returns the contents array of the category at path ‘aPath’.
Definition: FileManager.m:682
FileManager(Private)
Definition: FileManager.m:216
-[FileManager containingCategory]
NSString * containingCategory()
Returns a path to the category which contains the current selection.
Definition: FileManager.m:1392
-[FileManager importFile:renameTo:toPath:link:error:]
BOOL importFile:renameTo:toPath:link:error:(NSString *filePath,[renameTo] NSString *aNewName,[toPath] NSString *category,[link] BOOL linkFlag,[error] NSError **error)
Imports a specified on-disk file into the project.
Definition: FileManager.m:1815
-[FileManager filesAtPath:]
NSArray * filesAtPath:(NSString *category)
Lists the files contained in the category at path ‘category’.
Definition: FileManager.m:1651
TemplateFileSelector
Definition: TemplateFileSelector.h:37
FileManagerDelegate-p
This protocol declares what methods should be implemented by a FileManager delegate object.
Definition: FileManagerDelegate.h:43
-[FileManager selectedFiles]
NSArray * selectedFiles()
Returns the paths to the files that are currently selected, otherwise nil.
Definition: FileManager.m:1373
-[ProjectModule-p finishInit]
void finishInit()
Finishes the initialization process of the project module.
ProjectBrowser
Definition: ProjectBrowser.h:30
-[ProjectDocument setProjectName:]
void setProjectName:(NSString *aName)
Sets a new project name.
Definition: ProjectDocument.m:485
FileManager
Definition: FileManager.h:92
-[FileManager(Private) removeEntryAtPath:]
void removeEntryAtPath:(NSString *aPath)
Removes a file system dictionary entry.
Definition: FileManager.m:774
+[ProjectModule-p moduleName]
NSString * moduleName()
Should return a unique module identifier name.
-[ProjectModule-p toolbarItemIdentifiers]
NSArray * toolbarItemIdentifiers()
A module should return the default toolbar item identifiers for it's toolbar.
-[FileManager targetOfLinkAtPath:]
NSString * targetOfLinkAtPath:(NSString *aPath)
Queries the target of the link at path ‘aPath’.
Definition: FileManager.m:1672