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

#include <FS_Writer.h>

+ Inheritance diagram for FS_WriterHelper:

Public Member Functions

 FS_WriterHelper ()
 
virtual ~FS_WriterHelper ()
 
virtual FS_WriterStreamcreateStream (const char *source)=0
 
virtual bool canMakeDirectory (const char *source)
 
virtual bool makeDirectory (const char *source, mode_t mode=0777, bool ignore_umask=false)
 

Detailed Description

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

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

Definition at line 72 of file FS_Writer.h.

Constructor & Destructor Documentation

FS_WriterHelper::FS_WriterHelper ( )
inline

Definition at line 75 of file FS_Writer.h.

virtual FS_WriterHelper::~FS_WriterHelper ( )
inlinevirtual

Definition at line 77 of file FS_Writer.h.

Member Function Documentation

virtual bool FS_WriterHelper::canMakeDirectory ( const char *  source)
inlinevirtual

Whether this helper supports the given source path for makeDirectory().

If this helper supports the concept of directories and can create them, then this method should share the same implementation as your FS_InfoHelper::canHandle() override.

This is required for backwards compatibility for old FS_WriterHelper classes that did not understand how to make directories. When this returns false and an FS_InfoHelper exists for source, FSmakeDirs() will silently succeed to allow FS_WriterHelper::createStream() a chance to create source without first creating the necessary directories. This is to support cases where source has no concept of a "directory".

Reimplemented in HDK_Sample::FS_HomeWriteHelper.

Definition at line 98 of file FS_Writer.h.

virtual FS_WriterStream* FS_WriterHelper::createStream ( const char *  source)
pure virtual

Return an FS_WriterStream if the helper is able to open the source filename.

Implemented in HDK_Sample::FS_HomeWriteHelper, and OP_DataBlockWriteHelper.

virtual bool FS_WriterHelper::makeDirectory ( const char *  source,
mode_t  mode = 0777,
bool  ignore_umask = false 
)
inlinevirtual

Make a directory and all the parent directories needed.

Parameters
source
The path to create
mode
The unix file mode used to create the directory
ignore_umask
By default, the user's umask will be used in conjunction with the mode. This parameter will force the mode to be the given value.
Note
From the HDK, this is used by FSmakeDirs().

Reimplemented in HDK_Sample::FS_HomeWriteHelper.

Definition at line 110 of file FS_Writer.h.


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