HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FS_InfoHelper Class Referenceabstract

#include <FS_Info.h>

+ Inheritance diagram for FS_InfoHelper:

Public Member Functions

 FS_InfoHelper ()
 
virtual ~FS_InfoHelper ()
 
virtual bool canHandle (const char *source)=0
 Determine whether this helper can process the filename. More...
 
virtual bool hasAccess (const char *source, int mode)=0
 
virtual bool getIsDirectory (const char *source)=0
 Return whether the filename is a directory. More...
 
virtual time_t getModTime (const char *source)=0
 Get the modification timestamp (returns time_t) More...
 
virtual int64 getSize (const char *source)=0
 Get the file size in bytes. More...
 
virtual bool getContents (const char *source, UT_StringArray &contents, UT_StringArray *dirs)=0
 
virtual UT_String getExtension (const char *source)
 
virtual char getNextSepChar (const char *)
 Next separator character. More...
 
virtual char getPrevSepChar (const char *)
 Previous separator character. More...
 
virtual bool customNavigatePath (UT_String &path, const char *file)
 
virtual bool getPathOnDisk (UT_String &path, const char *file)
 

Detailed Description

This class provides a plug-in method for adding a custom "file system".

See Also
FS_ReaderHelper, FS_WriterHelper
Examples:
FS/FS_HomeHelper.h.

Definition at line 209 of file FS_Info.h.

Constructor & Destructor Documentation

FS_InfoHelper::FS_InfoHelper ( )
inline

Definition at line 212 of file FS_Info.h.

virtual FS_InfoHelper::~FS_InfoHelper ( )
inlinevirtual

Definition at line 214 of file FS_Info.h.

Member Function Documentation

virtual bool FS_InfoHelper::canHandle ( const char *  source)
pure virtual

Determine whether this helper can process the filename.

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.

virtual bool FS_InfoHelper::customNavigatePath ( UT_String path,
const char *  file 
)
inlinevirtual

Constructs a new path and returns true, if navigating a file path requires something else than appending getNextSepChar() and concatenating file. But if concatenating sep char and file is sufficient, does nothing and returns false.

Definition at line 262 of file FS_Info.h.

virtual bool FS_InfoHelper::getContents ( const char *  source,
UT_StringArray contents,
UT_StringArray dirs 
)
pure virtual

Read the contents of a directory

Parameters
source- The directory to read
contents- The list of files in the directory
dirs- The list of directories in the directory If dirs is NULL, then all directories should be included in the contents.

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.

virtual UT_String FS_InfoHelper::getExtension ( const char *  source)
inlinevirtual

Reimplemented in HDK_Sample::FS_HomeInfoHelper.

Examples:
FS/FS_HomeHelper.C.

Definition at line 245 of file FS_Info.h.

virtual bool FS_InfoHelper::getIsDirectory ( const char *  source)
pure virtual

Return whether the filename is a directory.

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.

virtual time_t FS_InfoHelper::getModTime ( const char *  source)
pure virtual

Get the modification timestamp (returns time_t)

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.

virtual char FS_InfoHelper::getNextSepChar ( const char *  )
inlinevirtual

Next separator character.

Reimplemented in FS_IconInfoHelper.

Definition at line 253 of file FS_Info.h.

virtual bool FS_InfoHelper::getPathOnDisk ( UT_String path,
const char *  file 
)
inlinevirtual

Returns the corresponding the path on disk where it should be located for the protocol. The path may not exist yet.

Definition at line 267 of file FS_Info.h.

virtual char FS_InfoHelper::getPrevSepChar ( const char *  )
inlinevirtual

Previous separator character.

Reimplemented in FS_IconInfoHelper.

Definition at line 256 of file FS_Info.h.

virtual int64 FS_InfoHelper::getSize ( const char *  source)
pure virtual

Get the file size in bytes.

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.

virtual bool FS_InfoHelper::hasAccess ( const char *  source,
int  mode 
)
pure virtual
Parameters
sourceFilename for access check
modeThe read/write/execute status
See Also
FS_FileAccessMode

Implemented in HDK_Sample::FS_HomeInfoHelper, OP_DataBlockInfoHelper, and FS_IconInfoHelper.


The documentation for this class was generated from the following file: