Adobe.com
Contents Suites Classes Class Index Member Index

AIFilePath.h

Go to the documentation of this file.
00001 #ifndef __AIFilePath__
00002 #define __AIFilePath__
00003 
00004 /*
00005  *        Name: AIFilePath.h
00006  *     Purpose: Adobe Illustrator File Path Suite.
00007  *
00008  * ADOBE SYSTEMS INCORPORATED
00009  * Copyright 2004-2007 Adobe Systems Incorporated.
00010  * All rights reserved.
00011  *
00012  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00013  * in accordance with the terms of the Adobe license agreement 
00014  * accompanying it. If you have received this file from a source other 
00015  * than Adobe, then your use, modification, or distribution of it 
00016  * requires the prior written permission of Adobe.
00017  *
00018  */
00019 
00020 #include "IAIFilePath.hpp"
00021 
00022 #include "AIHeaderBegin.h"
00023 
00026 /*******************************************************************************
00027  **
00028  ** Constants
00029  **
00030  **/
00031 
00032 #define kAIFilePathSuite                        "AI File Path Suite"
00033 
00034 #define kAIFilePathSuiteVersion         AIAPI_VERSION(5)
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         /* Set operations */
00169 
00177         AIErr AIAPI (*Set)(const ai::UnicodeString &pathString, AIBool8 expandName, ai::FilePath &path);
00178 
00183         void AIAPI (*SetFromSPFileRef)(const SPPlatformFileReference&, ai::FilePath &path);
00184 
00185         #ifdef MAC_ENV
00186 
00191         AIErr AIAPI (*SetFromCFString)(const CFStringRef, ai::FilePath &path);
00192 
00197         AIErr AIAPI (*SetFromFSRef)(const FSRef&, ai::FilePath &path);
00198 
00203         void AIAPI (*SetFromCFURL)(const CFURLRef, ai::FilePath &path);
00204 
00205         #endif  // MAC_ENV
00206 
00207         /*****************************************************************************/
00208         /* Get operations */
00209 
00217         AIErr AIAPI (*GetFileName)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fileName);
00218 
00223         AIErr AIAPI (*GetFileNameNoExt)(const ai::FilePath &path, ai::UnicodeString &fileNameNoExt);
00224 
00229         AIErr AIAPI (*GetFileExtension)(const ai::FilePath &path, ai::UnicodeString &ext);
00230 
00237         AIErr AIAPI (*GetFullPath)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fullPath);
00238 
00247         AIErr AIAPI (*GetDirectory)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &directory);
00248 
00258         AIErr AIAPI (*GetShortPath)(const ai::FilePath &path, ai::UnicodeString &shortPath);
00259 
00269         AIErr AIAPI (*GetParent)(const ai::FilePath &path, ai::FilePath &parent);
00270 
00275         char AIAPI (*GetDelimiter)(void);
00276 
00277         #ifdef MAC_ENV
00278 
00284         void AIAPI (*GetVolumeAndParent)(const ai::FilePath &path, FSVolumeRefNum *vol, ai::uint32 *parent);
00285         #endif
00286 
00293         AIErr AIAPI (*GetCreatorAndType)(const ai::FilePath &path, ai::uint32 *creator, ai::uint32 *type);
00294 
00302         AIErr AIAPI (*GetAsURL)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &url);
00303 
00309         AIErr AIAPI (*GetAsSPPlatformFileRef)(const ai::FilePath &path, SPPlatformFileReference &spPlatformFileRef);
00310 
00311         #ifdef MAC_ENV
00312 
00318         CFStringRef AIAPI (*GetAsCFString)(const ai::FilePath &path);
00319 
00326         OSStatus AIAPI (*GetAsFSRef)(const ai::FilePath &path, FSRef &fsRef);
00327 
00333         CFURLRef AIAPI (*GetAsCFURL)(const ai::FilePath &path);
00334 
00335         #endif  // MAC_ENV
00336 
00338         void AIAPI (*ResetVolumeCache)(void);
00339     
00340 #ifdef MAC_ENV
00341 #ifdef __OBJC__
00342     
00343     NSString*   AIAPI (*GetAsNSString)                  (const ai::FilePath &path);
00344     
00345     NSURL*      AIAPI (*GetAsNSURL)                     (const ai::FilePath &path);
00346     
00347     NSData*     AIAPI (*GetAsBookmarkData)              (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError );
00348     
00349     NSData*     AIAPI (*GetAsMinimalBookmarkData)       (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError );
00350     
00351     BOOL        AIAPI (*SetFromBookmarkData)            (ai::FilePath &path, NSData* inBookmarkData, const ai::FilePath& inRelativeToPath, NSError** outError );
00352     
00353     void        AIAPI (*GetVolumeAndParentFromFilePath) (const ai::FilePath &path, NSURL **outVolume, NSURL **outParent);
00354     
00355     BOOL        AIAPI (*IsAlias)                        (const ai::FilePath &path);
00356     
00357     BOOL        AIAPI (*IsOnNetwork)                    (const ai::FilePath &path);
00358     
00359     BOOL        AIAPI (*IsEjectable)                    (const ai::FilePath &path);
00360 
00361 #endif //__OBJC__
00362 #endif //MAC_ENV
00363     
00364 };
00365 
00366 #include "AIHeaderEnd.h"
00367 
00368 #endif // __AIFilePath__


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks