2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __NGCustomFileManager_H__
23 #define __NGCustomFileManager_H__
25 #include <NGExtensions/NGFileManager.h>
28 An abstract baseclass for developing custom filemanagers which are ideally
29 based on other filemanager classes.
32 @class NGCustomFileManagerInfo;
34 @interface NGCustomFileManager : NGFileManager
40 - (NSString *)makeAbsolutePath:(NSString *)_path;
41 - (NGCustomFileManagerInfo *)fileManagerInfoForPath:(NSString *)_path;
45 @interface NGCustomFileManager(NGFileManagerVersioning)
49 - (BOOL)checkoutFileAtPath:(NSString *)_path handler:(id)_handler;
50 - (BOOL)releaseFileAtPath:(NSString *)_path handler:(id)_handler;
51 - (BOOL)rejectFileAtPath:(NSString *)_path handler:(id)_handler;
52 - (BOOL)checkoutFileAtPath:(NSString *)_path version:(NSString *)_version
57 - (NSString *)lastVersionAtPath:(NSString *)_path;
58 - (NSArray *)versionsAtPath:(NSString *)_path;
59 - (NSData *)contentsAtPath:(NSString *)_path version:(NSString *)_version;
60 - (NSDictionary *)fileAttributesAtPath:(NSString *)_path
61 traverseLink:(BOOL)_followLink
62 version:(NSString *)_version;
66 @interface NGCustomFileManager(NGFileManagerDataSources)
68 /* datasources (work on folders) */
70 - (EODataSource *)dataSourceAtPath:(NSString *)_path;
71 - (EODataSource *)dataSource; // works on current-directory-path
75 @interface NGCustomFileManager(NGFileManagerLocking)
77 - (BOOL)lockFileAtPath:(NSString *)_path handler:(id)_handler;
78 - (BOOL)unlockFileAtPath:(NSString *)_path handler:(id)_handler;
79 - (BOOL)isFileLockedAtPath:(NSString *)_path;
82 - (BOOL)isLockableFileAtPath:(NSString *)_path;
83 - (BOOL)isUnlockableFileAtPath:(NSString *)_path;
87 @interface NGCustomFileManagerInfo : NSObject
90 NGCustomFileManager *master; /* non retained */
91 id<NGFileManager,NSObject> fileManager;
94 - (id)initWithCustomFileManager:(NGCustomFileManager *)_master
95 fileManager:(id<NGFileManager,NSObject>)_fm;
101 - (NGCustomFileManager *)master;
102 - (id<NGFileManager,NSObject>)fileManager;
106 - (NSString *)rewriteAbsolutePath:(NSString *)_path;
110 - (BOOL)supportsGlobalIDs;
114 #endif /* __NGCustomFileManager_H__ */