2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo 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 OGo 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 OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __NGCustomFileManager_H__
24 #define __NGCustomFileManager_H__
26 #include <NGExtensions/NGFileManager.h>
29 An abstract baseclass for developing custom filemanagers which are ideally
30 based on other filemanager classes.
33 @class NGCustomFileManagerInfo;
35 @interface NGCustomFileManager : NGFileManager
41 - (NSString *)makeAbsolutePath:(NSString *)_path;
42 - (NGCustomFileManagerInfo *)fileManagerInfoForPath:(NSString *)_path;
46 @interface NGCustomFileManager(NGFileManagerVersioning)
50 - (BOOL)checkoutFileAtPath:(NSString *)_path handler:(id)_handler;
51 - (BOOL)releaseFileAtPath:(NSString *)_path handler:(id)_handler;
52 - (BOOL)rejectFileAtPath:(NSString *)_path handler:(id)_handler;
53 - (BOOL)checkoutFileAtPath:(NSString *)_path version:(NSString *)_version
58 - (NSString *)lastVersionAtPath:(NSString *)_path;
59 - (NSArray *)versionsAtPath:(NSString *)_path;
60 - (NSData *)contentsAtPath:(NSString *)_path version:(NSString *)_version;
61 - (NSDictionary *)fileAttributesAtPath:(NSString *)_path
62 traverseLink:(BOOL)_followLink
63 version:(NSString *)_version;
67 @interface NGCustomFileManager(NGFileManagerDataSources)
69 /* datasources (work on folders) */
71 - (EODataSource *)dataSourceAtPath:(NSString *)_path;
72 - (EODataSource *)dataSource; // works on current-directory-path
76 @interface NGCustomFileManager(NGFileManagerLocking)
78 - (BOOL)lockFileAtPath:(NSString *)_path handler:(id)_handler;
79 - (BOOL)unlockFileAtPath:(NSString *)_path handler:(id)_handler;
80 - (BOOL)isFileLockedAtPath:(NSString *)_path;
83 - (BOOL)isLockableFileAtPath:(NSString *)_path;
84 - (BOOL)isUnlockableFileAtPath:(NSString *)_path;
88 @interface NGCustomFileManagerInfo : NSObject
91 NGCustomFileManager *master; /* non retained */
92 id<NGFileManager,NSObject> fileManager;
95 - (id)initWithCustomFileManager:(NGCustomFileManager *)_master
96 fileManager:(id<NGFileManager,NSObject>)_fm;
102 - (NGCustomFileManager *)master;
103 - (id<NGFileManager,NSObject>)fileManager;
107 - (NSString *)rewriteAbsolutePath:(NSString *)_path;
111 - (BOOL)supportsGlobalIDs;
115 #endif /* __NGCustomFileManager_H__ */