00001 #ifndef __AIFilePath__
00002 #define __AIFilePath__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "IAIFilePath.hpp"
00021
00022 #include "AIHeaderBegin.h"
00023
00026
00027
00028
00029
00030
00031
00032 #define kAIFilePathSuite "AI File Path Suite"
00033
00034 #define kAIFilePathSuiteVersion AIAPI_VERSION(7)
00035
00036 #define kAIFilePathVersion kAIFilePathSuiteVersion
00037
00045 struct AIFilePathSuite
00046 {
00051 AIErr AIAPI (*NewFilePath)(ai::FilePath &path);
00052
00056 AIErr AIAPI (*DeleteFilePath)(ai::FilePath &path);
00057
00063 AIErr AIAPI (*Copy)(const ai::FilePath &src, ai::FilePath &dest);
00064
00070 AIBool8 AIAPI (*IsEmpty)(const ai::FilePath &path);
00071
00076 void AIAPI (*MakeEmpty)(ai::FilePath &path);
00077
00078
00092 AIBool8 AIAPI (*Equal)(const ai::FilePath &a, const ai::FilePath &b, const AIBool8 resolveLinks);
00093
00100 AIBool8 AIAPI (*LessThan)(const ai::FilePath &a, const ai::FilePath &b);
00101
00107 AIBool8 AIAPI (*StartsWithDelimiter)(const ai::FilePath &path);
00108
00113 AIBool8 AIAPI (*EndsWithDelimiter)(const ai::FilePath &path);
00114
00121 AIErr AIAPI (*AddComponent)(const ai::UnicodeString &addend, ai::FilePath &augend);
00122
00127 void AIAPI (*RemoveComponent)(ai::FilePath &path);
00128
00135 void AIAPI (*AddExtension)(const ai::UnicodeString &ext, ai::FilePath &path);
00136
00141 void AIAPI (*RemoveExtension)(ai::FilePath &path);
00142
00157 AIBool8 AIAPI (*Exists)(const ai::FilePath &path, const AIBool8 resolveLinks,
00158 ai::UnicodeString *longPath, AIBool8 *isFile);
00159
00165 AIErr AIAPI (*Resolve)(ai::FilePath &path);
00166
00167
00168
00169
00179 AIErr AIAPI (*Set)(const ai::UnicodeString &pathString, AIBool8 expandName,
00180 AIBool8 dontStripTrailingSpace, ai::FilePath &path);
00181
00186 void AIAPI (*SetFromSPFileRef)(const SPPlatformFileReference&, ai::FilePath &path);
00187
00188 #ifdef MAC_ENV
00189
00194 AIErr AIAPI (*SetFromCFString)(const CFStringRef, ai::FilePath &path);
00195
00207 AIErr AIAPI (*SetFromFSRef)(const FSRef&, ai::FilePath &path);
00208
00213 void AIAPI (*SetFromCFURL)(const CFURLRef, ai::FilePath &path);
00214
00215 #endif // MAC_ENV
00216
00217
00218
00219
00227 AIErr AIAPI (*GetFileName)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fileName);
00228
00233 AIErr AIAPI (*GetFileNameNoExt)(const ai::FilePath &path, ai::UnicodeString &fileNameNoExt);
00234
00239 AIErr AIAPI (*GetFileExtension)(const ai::FilePath &path, ai::UnicodeString &ext);
00240
00247 AIErr AIAPI (*GetFullPath)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fullPath);
00248
00257 AIErr AIAPI (*GetDirectory)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &directory);
00258
00268 AIErr AIAPI (*GetShortPath)(const ai::FilePath &path, ai::UnicodeString &shortPath);
00269
00279 AIErr AIAPI (*GetParent)(const ai::FilePath &path, ai::FilePath &parent);
00280
00285 char AIAPI (*GetDelimiter)(void);
00286
00287 #ifdef MAC_ENV
00288
00301 void AIAPI (*GetVolumeAndParent)(const ai::FilePath &path, FSVolumeRefNum *vol, ai::uint32 *parent);
00302 #endif
00303
00310 AIErr AIAPI (*GetCreatorAndType)(const ai::FilePath &path, ai::uint32 *creator, ai::uint32 *type);
00311
00319 AIErr AIAPI (*GetAsURL)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &url);
00320
00327 AIErr AIAPI (*GetAsSPPlatformFileRef)(const ai::FilePath &path, SPPlatformFileReference &spPlatformFileRef);
00328
00333 AIBoolean AIAPI(*IsOnNetwork)(const ai::FilePath &path);
00334
00335 #ifdef MAC_ENV
00336
00342 CFStringRef AIAPI (*GetAsCFString)(const ai::FilePath &path);
00343
00357 OSStatus AIAPI (*GetAsFSRef)(const ai::FilePath &path, FSRef &fsRef);
00358
00364 CFURLRef AIAPI (*GetAsCFURL)(const ai::FilePath &path);
00365
00366 #endif // MAC_ENV
00367
00369 void AIAPI (*ResetVolumeCache)(void);
00370
00371 #ifdef MAC_ENV
00372 #ifdef __OBJC__
00373
00374 NSString* AIAPI (*GetAsNSString) (const ai::FilePath &path);
00375
00376 NSURL* AIAPI (*GetAsNSURL) (const ai::FilePath &path);
00377
00378 NSData* AIAPI (*GetAsBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError );
00379
00380 NSData* AIAPI (*GetAsMinimalBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError );
00381
00382 BOOL AIAPI (*SetFromBookmarkData) (ai::FilePath &path, NSData* inBookmarkData, const ai::FilePath& inRelativeToPath, NSError** outError );
00383
00384 void AIAPI (*GetVolumeAndParentFromFilePath) (const ai::FilePath &path, NSURL **outVolume, NSURL **outParent);
00385
00386 BOOL AIAPI (*IsAlias) (const ai::FilePath &path);
00387
00388 BOOL AIAPI (*IsEjectable) (const ai::FilePath &path);
00389
00390 #endif //__OBJC__
00391 #endif //MAC_ENV
00392
00393 };
00394
00395 #include "AIHeaderEnd.h"
00396
00397 #endif // __AIFilePath__