TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iFileSystem Struct Referenceabstract
Inheritance diagram for iFileSystem:
iUnknown

Detailed Description

File system interface.

Public Member Functions

virtual tFileSystemRightsFlags GetRightsFlags () const =0
 Get the file system's rights. {Property}. More...
 
virtual const acharGetBaseContainer () const =0
 Get the file system's base container. More...
 
virtual tBool FileMakeDir (const achar *aszDir)=0
 Create a directory. More...
 
virtual tBool FileDeleteDir (const achar *aszDir)=0
 Delete a directory. More...
 
virtual tBool FileCopy (const achar *aszDest, const achar *aszSrc)=0
 Copy a file. More...
 
virtual tBool FileMove (const achar *aszDest, const achar *aszSrc)=0
 Move a file. More...
 
virtual tBool FileDelete (const achar *aszFile)=0
 Delete a file. More...
 
virtual tU32 FileEnum (const achar *aszFile, tU32 aAttribs, iFileEnumSink *pSink)=0
 Enumerate files in the specified directory. More...
 
virtual tU32 FileExists (const achar *aszFile, tU32 aAttribs)=0
 Checks if a file exists. More...
 
virtual tI64 FileSize (const achar *aszFile)=0
 Get the size of a file. More...
 
virtual iFileFileOpen (const achar *aszFile, eFileOpenMode aMode)=0
 Open a file for a read and/or write operation. More...
 
virtual iFileBaseFileBaseOpen (const achar *aszFile, eFileOpenMode aMode)=0
 Open a file for a read and/or write operation. More...
 
virtual cString GetAbsolutePath (const achar *aaszFile) const =0
 Get the absolute path of the given file or directory. More...
 
virtual iFileSystemEnumeratorCreateEnumerator ()=0
 Create a file system enumerator. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tFileSystemRightsFlags GetRightsFlags ( ) const
pure virtual

Get the file system's rights. {Property}.

virtual const achar* GetBaseContainer ( ) const
pure virtual

Get the file system's base container.

Remarks
This depend on the type of file system, it can be a file, a folder, a remote location, and so on... {Property}
virtual tBool FileMakeDir ( const achar aszDir)
pure virtual

Create a directory.

virtual tBool FileDeleteDir ( const achar aszDir)
pure virtual

Delete a directory.

virtual tBool FileCopy ( const achar aszDest,
const achar aszSrc 
)
pure virtual

Copy a file.

virtual tBool FileMove ( const achar aszDest,
const achar aszSrc 
)
pure virtual

Move a file.

virtual tBool FileDelete ( const achar aszFile)
pure virtual

Delete a file.

virtual tU32 FileEnum ( const achar aszFile,
tU32  aAttribs,
iFileEnumSink pSink 
)
pure virtual

Enumerate files in the specified directory.

Parameters
aszFileis the path with filter of what to enumerate.
aAttribsis a filter that defines the attributes that will be enumerated.
pSinkis the callback interface that will be called when a file is found.
Returns
The number of files found. eInvalidHandle indicates an error.
virtual tU32 FileExists ( const achar aszFile,
tU32  aAttribs 
)
pure virtual

Checks if a file exists.

Parameters
aszFileis the path to check.
aAttribsis a filter that defines the attributes that will be enumerated.
Returns
0 if the file doesnt exist else its attributes.
virtual tI64 FileSize ( const achar aszFile)
pure virtual

Get the size of a file.

virtual iFile* FileOpen ( const achar aszFile,
eFileOpenMode  aMode 
)
pure virtual

Open a file for a read and/or write operation.

virtual iFileBase* FileBaseOpen ( const achar aszFile,
eFileOpenMode  aMode 
)
pure virtual

Open a file for a read and/or write operation.

virtual cString GetAbsolutePath ( const achar aaszFile) const
pure virtual

Get the absolute path of the given file or directory.

virtual iFileSystemEnumerator* CreateEnumerator ( )
pure virtual

Create a file system enumerator.