Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
NSFileManagerOOExtensions.h
Go to the documentation of this file.
1/*
2
3NSFileManagerOOExtensions.h
4
5This extends NSFileManager and adds some methods to insulate the
6main oolite code from the gory details of creating/chdiring to the
7commander save directory, as well as handling OXZ inspection
8
9Oolite
10Copyright (C) 2004-2013 Giles C Williams and contributors
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20GNU General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with this program; if not, write to the Free Software
24Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25MA 02110-1301, USA.
26
27*/
28
29#import <Foundation/Foundation.h>
30
31#define SAVEDIR "oolite-saves"
32
33#if OOLITE_SDL
34#define SNAPSHOTDIR "snapshots"
35#endif
36
37@interface NSFileManager (OOExtensions)
38
39- (NSArray *) commanderContentsOfPath:(NSString*)savePath;
40- (NSString *) defaultCommanderPath;
41
42/*
43 Wrappers for methods that were deprecated in Leopard but whose replacements
44 still aren't in GNUstep.
45*/
46- (NSArray *) oo_directoryContentsAtPath:(NSString *)path;
47- (BOOL) oo_createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes;
48- (NSDictionary *) oo_fileAttributesAtPath:(NSString *)path traverseLink:(BOOL)yorn;
49- (NSDictionary *) oo_fileSystemAttributesAtPath:(NSString *)path;
50- (BOOL) oo_removeItemAtPath:(NSString *)path;
51- (BOOL) oo_moveItemAtPath:(NSString *)src toPath:(NSString *)dest;
52
53#if OOLITE_SDL
54- (BOOL) chdirToSnapshotPath;
55#endif
56
57// this also checks inside OXZ files; always returns NO for directories
58- (BOOL) oo_oxzFileExistsAtPath:(NSString *)path;
59
60@end
61
62