InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICoreFilename.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Steve Flenniken
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ICOREFILENAME__
25 #define __ICOREFILENAME__
26 
27 #include "IDatalink.h" // for ProgressParam
28 #include "CmdUtils.h" // for CreateObject
29 
30 class IDFile;
31 class NameInfo;
32 class PMString;
33 
50 class ICoreFilename : public IPMUnknown
51 {
52 public:
53  enum { kDefaultIID = IID_ICOREFILENAME };
54 
58  virtual void ReadWrite(IPMStream *s) = 0;
59 
64  virtual int32 Initialize(const IDFile *name) = 0;
65 
75  virtual int32 Initialize(PMString *filename, PMString *volname, int32 dirid, const PMString *fullPath = nil) = 0;
76 
81  virtual int32 Initialize(ICoreFilename *cfn) = 0;
82 
88  virtual int32 Initialize(NameInfo *ni, const PMString *fullPath = nil) = 0;
89 
94  virtual int32 Initialize(PMString *fullpath) = 0;
95 
100  virtual int32 SetBaseName(PMString *name) = 0;
101 
106  virtual int32 GetSysFile(IDFile *name) = 0;
107 
114  virtual int32 GetSysFile(NameInfo& ni, IDFile *name) const = 0;
115 
120  virtual int32 GetNameInfo(NameInfo *ni) = 0;
121 
125  virtual PMString *GetFilename() = 0;
126 
130  virtual PMString *GetVolume() = 0;
131 
135  virtual int32 GetDirID() = 0;
136 
140  virtual ClassID GetClassID() = 0;
141 
145  virtual IDFile* GetFile() = 0;
146 
150  virtual void GetExtension(PMString *extension) = 0;
151 
155  virtual PMString *GetBaseName() = 0;
156 
161  virtual PMString *GetFullName(bool16* bChangedName = nil) = 0;
162 
175  virtual int32 GetFileInfo(uint64 *size, uint64 *time, IDataLink * link = nil) = 0;
176 
180  virtual bool16 FileExists() = 0;
181 
185  virtual bool16 DirectoryExists() = 0;
186 
192  virtual int32 Copy(ICoreFilename *dirname, ProgressParam *pp) = 0;
193 
197  virtual int32 Delete() = 0;
198 
202  virtual int32 Touch() = 0;
203 
208  virtual FILE *fileopen(PMString *mode) = 0;
209 
217  virtual int32 GetTypeAndCreator(uint32 *type, uint32 *creator) = 0;
218 
223  virtual int32 GetDiskFreeSpace(uint64 *free) = 0;
224 
230  virtual int32 FindRelative(ICoreFilename *dirname, ICoreFilename *newname) = 0;
231 
237  virtual int32 Combine(ICoreFilename *dirname, ICoreFilename *pcombined) = 0;
238 
243  virtual bool16 CompareBaseName(ICoreFilename *cfn) = 0;
244 
249  virtual bool16 CompareDirectory(ICoreFilename *cfn) = 0;
250 
254  virtual bool16 IsFileOpen() = 0;
255 
259  virtual bool16 IsFileLocked() = 0;
260 
265  virtual void SetTypeAndCreator(uint32 fileType, uint32 creator) = 0;
266 
272  virtual int32 CreateFolder(PMString *name) = 0;
273 
280  virtual ICoreFilename *CreateChildFolderFilename(const PMString &childFolder, PMString &filePart) = 0;
281 
285  virtual bool32 ConvertToUNC() = 0;
286 
290  virtual bool16 IsFileOpenExclusive() = 0;
291 
295  virtual bool32 SwitchToParentDir() = 0;
296 };
297 
298 #endif // __ICOREFILENAME__