xflminterface IF_DirHdl : public XF_RefCount
This class represents the directory handle interface. It extends XF_RefCount and provides functionality for creating, deleting and interacting with directories in a file system.
Method Summary |
|
RCODE | Next - move to the next item in the directory |
char * | CurrentItemName - returns the name of the current item |
void | CurrentItemPath - returns the full pathname of the current item |
FLMUINT | CurrentItemSize - returns the size of the current item |
FLMBOOL | CurrentItemIsDir - returns true if the current item is another directory |
RCODE | OpenDir - opens the specified directory |
RCODE | CreateDir - creates a new directory |
RCODE | RemoveDir - deletes an existing empty directory |
Method Detail |
RCODE Next( void);
Move the class's internal pointer to the next item - either file or another directory - in the directory.
Parameters In: none.
Parameters Out: none.
See Also:
char * CurrentItemName( void);
Returns the name of the item that the class's internal pointer is currently referring to.
Parameters In: none.
Parameters Out: none.
See Also:
void CurrentItemPath(
char * pszPath);
Stores the full pathname of the item that the class's internal pointer is currently referring to in pszPath
Parameters In: none.
Parameters Out:
char * pszPath The pathname of the current item.
See Also:
FLMUINT CurrentItemSize( void);
Returns the size (in bytes) of the item that the class's internal pointer is currently referring to. In the case where the directory hasn't been opened, or the class is otherwise uninitialized, the function returns 0.
Parameters In: none.
Parameters Out: none.
See Also:
FLMBOOL CurrentItemIsDir( void);
Returns true if the item that the class's internal pointer is currently referring to is a directory.
Parameters In: none.
Parameters Out: none.
See Also:
RCODE OpenDir(
char * pszDirName,
char * pszPattern);
Opens an existing directory. pszPattern is a wildcard pattern (such as *.*) that is used by the Next function. Only items that match the pattern will be iterated by calls to Next.
Parameters In:
char * pszDirName The name of the directory to open char * pszPattern A wildcard matching pattern
Parameters Out: none.
See Also: Next
RCODE CreateDir(
char * pszDirName);
Creates a new directory.
Parameters In:
char * pszDirName The name of the directory to create
Parameters Out: none.
See Also:
RCODE RemoveDir(
char * pszDirName);
Deletes an empty directory. Returns an error if the directory is not empty.
Parameters In:
char * pszDirName The name of the directory to remove
Parameters Out: none.
See Also: