![]() | InDesign SDK 20.5 |
#include <ICoreFilename.h>

Public Types | |
| enum | { kDefaultIID = IID_ICOREFILENAME } |
Public Member Functions | |
| virtual void | ReadWrite (IPMStream *s)=0 |
| virtual int32 | Initialize (const IDFile *name)=0 |
| virtual int32 | Initialize (PMString *filename, PMString *volname, int32 dirid, const PMString *fullPath=nil)=0 |
| virtual int32 | Initialize (ICoreFilename *cfn)=0 |
| virtual int32 | Initialize (NameInfo *ni, const PMString *fullPath=nil)=0 |
| virtual int32 | Initialize (PMString *fullpath)=0 |
| virtual int32 | SetBaseName (PMString *name)=0 |
| virtual int32 | GetSysFile (IDFile *name)=0 |
| virtual int32 | GetSysFile (NameInfo &ni, IDFile *name) const =0 |
| virtual int32 | GetNameInfo (NameInfo *ni)=0 |
| virtual PMString * | GetFilename ()=0 |
| virtual PMString * | GetVolume ()=0 |
| virtual int32 | GetDirID ()=0 |
| virtual ClassID | GetClassID ()=0 |
| virtual IDFile * | GetFile ()=0 |
| virtual void | GetExtension (PMString *extension)=0 |
| virtual PMString * | GetBaseName ()=0 |
| virtual PMString * | GetFullName (bool16 *bChangedName=nil)=0 |
| virtual int32 | GetFileInfo (uint64 *size, uint64 *time, IDataLink *link=nil)=0 |
| virtual bool16 | FileExists ()=0 |
| virtual bool16 | DirectoryExists ()=0 |
| virtual int32 | Copy (ICoreFilename *dirname, ProgressParam *pp)=0 |
| virtual int32 | Delete ()=0 |
| virtual int32 | Touch ()=0 |
| virtual FILE * | fileopen (PMString *mode)=0 |
| virtual int32 | GetTypeAndCreator (uint32 *type, uint32 *creator)=0 |
| virtual int32 | GetDiskFreeSpace (uint64 *free)=0 |
| virtual int32 | FindRelative (ICoreFilename *dirname, ICoreFilename *newname)=0 |
| virtual int32 | Combine (ICoreFilename *dirname, ICoreFilename *pcombined)=0 |
| virtual bool16 | CompareBaseName (ICoreFilename *cfn)=0 |
| virtual bool16 | CompareDirectory (ICoreFilename *cfn)=0 |
| virtual bool16 | IsFileOpen ()=0 |
| virtual bool16 | IsFileLocked ()=0 |
| virtual void | SetTypeAndCreator (uint32 fileType, uint32 creator)=0 |
| virtual int32 | CreateFolder (PMString *name)=0 |
| virtual ICoreFilename * | CreateChildFolderFilename (const PMString &childFolder, PMString &filePart)=0 |
| virtual bool32 | ConvertToUNC ()=0 |
| virtual bool16 | IsFileOpenExclusive ()=0 |
| virtual bool32 | SwitchToParentDir ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
ICoreFilename provides file I/0 and filename features in a core way.
See also newer IDFile and associated classes.
There are currently two styles of names, PC and Macintosh. Either style can exist on either platform.
A pc name has a filename, no volname (0) and no dirid (0). The filename is a fully qualified pathname, up to 259 characters.
A Mac name has all three parameters. The filename and volname have a maximum length of 31 characters. The dirid must not be 0.
You can create a ICoreFilename object as follows: InterfacePtr<ICoreFilename> cfn((ICoreFilename *)::CreateObject(kCoreFilenameBoss, IID_ICOREFILENAME));
| pure virtual |
Method to create a new ICoreFilename from a directory and the file's base name.
| dirname | is the directory for the new name. |
| pcombined | returns the new name, directory plus the file's base name. |
| pure virtual |
Method to compare the base name of two ICoreFilenames.
| cfn | contains the name to compare. |
| pure virtual |
Method to compare the directory name of two ICoreFilenames.
| cfn | contains the name to compare. |
| pure virtual |
If the file is on a network drive, convert the path name to UNC from the drive letter one.
| pure virtual |
Method to copy a file.
| dirname | is the destination directory. |
| pp | is an optional progress callback, pass nil for no callback. |
| pure virtual |
Method to create a new ICoreFilename. The directory comes from the child directory within current directory.
| childFolder | is a directory within the current directory. The current directory is the directory of the associated file. |
| filePart | is the base name for the new ICoreFilename. |
| pure virtual |
Method to create a directory.
| name | is the directory name to create in the current directory. The current directory is the directory of the associated file. If name is nil, create the current directory. |
| pure virtual |
Method to delete the file.
| pure virtual |
Method to determine whether the directory the file is in exists.
| pure virtual |
Method to determine whether the file exists.
| pure virtual |
Method to open the file using the standard C file I/O method.
| mode | to open the file. Writable = "w", Readonly = "r", Writeable binary = "wb". See fopen. |
| pure virtual |
Method to quickly find the file relative to the given directory.
| dirname | is the directory where relative search is based on. |
| newname | returns the name when found. |
| pure virtual |
Method to get the associated base name, the filename without path information.
| pure virtual |
Method to get the associated Class ID (part of NameInfo).
| pure virtual |
Method to get the associated Dir ID.
| pure virtual |
Method to determine the amount of free bytes on the file's disk.
| free | parameter to get the free disk space in bytes. |
| pure virtual |
Method to get the associated file extension.
| pure virtual |
| pure virtual |
Get the file size and file modified time stamp information.
| size | optional parameter to get the size of the file in bytes. Pass nil if you don't want the size. |
| time | optional parameter to get the file's modified time stamp. See GlobalTime.h. Pass nil if you don't want the time stamp. |
| The | link parameter is a hack to fix dirID problem on MAC when file is located on network file system such as NFS or SMB. When link is not nil, IDataLink object could be updated to reflect correct dirID for current session. This operation will not dirty document. Generally, you should use default value. It is not used on windows. |
| pure virtual |
Method to get the associated filename.
| pure virtual |
Method to get the associated full path name.
| bChangedName | optional parameter to return whether the name was changed (initialized). |
| pure virtual |
Method to get the NameInfo that represents this ICoreFilename.
| ni | to get. |
| pure virtual |
Method to get the IDFile that represents this ICoreFilename.
| name | to get. |
| pure virtual |
Method to get the system file information that represents this ICoreFilename. GetSysFile which can be used without calling Initialize.
| ni | NameInfo to get. |
| name | to get. |
| pure virtual |
Method to determine the file's Macintosh type and creator.
| type | optional parameter to get the Macintosh type, 0 is returned on Windows. Pass nil if you don't want this information. |
| creator | optional parameter to get the Macintosh creator, 0 is returned on Windows. Pass nil if you don't want this information. |
| pure virtual |
Method to get the associated volume name.
| pure virtual |
Method to initialize.
| name | is an IDFile to initialize from. |
| pure virtual |
Method to initialize.
| filename | is the filename to initialize from. For Macintosh style names, filename is the name without path or extension. For Windows style names, filename is a fully qualitfied path name. |
| volname | is the volume name on the Macintosh or nil for Windows. |
| dirid | is the directory ID on the Macintosh or 0 for Windows. |
| fullPath | is an optional full path name. |
| pure virtual |
Method to initialize.
| cfn | is an ICoreFilename to initialize from. |
| pure virtual |
Method to initialize.
| ni | is an NameInfo to initialize from. |
| fullPath | is an optional full path name. |
| pure virtual |
Method to initialize.
| fullPath | is a full path name. |
| pure virtual |
Method to determine whether the file is locked, IDFile::kLocked bit. See IDFile::GetAttribute.
| pure virtual |
Method to determine whether the file is open. See IDFile::IsOpen.
| pure virtual |
Method to determine whether the file is currently open for exclusive read access.
| pure virtual |
Method to stream out the CoreFilename data.
| s | is the stream to write to. |
| pure virtual |
Method to change the base name. The base name is the filename without path information.
| name | to become the base name. |
| pure virtual |
Method to set the Macintosh type and creator.
| fileType | is the Macintosh file type. |
| creator | is the Macintosh creator. |
| pure virtual |
Method to moves up one level in the file system hierarchy.
| pure virtual |
Method to update the file's modified time stamp to the current time.