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
This protocol declares what methods should be implemented by a FileManager delegate object.
Definition: FileManagerDelegate.h:43