FileFinder Class Reference

Provides capability for file system searches. More...

#include <FileFinder.h>

List of all members.

Public Member Functions

virtual bool findFile (const std::string &path, const std::string &criteria, bool includeDirectories=false)=0
virtual bool findNextFile ()=0
virtual double getLength () const =0
virtual std::string getFileName () const =0
virtual std::string getFilePath () const =0
virtual bool getFileTitle (std::string &fileTitle) const =0
virtual bool getFullPath (std::string &fullFilePath) const =0
virtual void getLastAccessTime (DateTime &dt) const =0
virtual void getLastModificationTime (DateTime &dt) const =0
virtual bool isDots () const =0
virtual bool isDirectory () const =0
virtual bool isReadOnly () const =0

Protected Member Functions

virtual ~FileFinder ()


Detailed Description

Provides capability for file system searches.

A platform-independent tool for searching the file system and querying file attributes.

See also:
Filename

Definition at line 25 of file FileFinder.h.


Constructor & Destructor Documentation

virtual FileFinder::~FileFinder (  )  [protected, virtual]

This should be destroyed by calling ObjectFactory::destroyObject.

Definition at line 146 of file FileFinder.h.


Member Function Documentation

virtual bool FileFinder::findFile ( const std::string &  path,
const std::string &  criteria,
bool  includeDirectories = false 
) [pure virtual]

Determine if any files meet client's criteria.

Parameters:
path The directory to search.
criteria Search criteria. This is operating system dependent but generally contains either a filename, a glob, or is empty. An empty string will search for all files.
includeDirectories Should subdirectories be includes in the results? If false, only files are included.
Returns:
True if any files were identified as meeting the criteria.

virtual bool FileFinder::findNextFile (  )  [pure virtual]

Designate first/next entry in list of qualified files.

Returns:
True if another file has qualified and can be interrogated for status by the application.

virtual double FileFinder::getLength (  )  const [pure virtual]

Get the length of the current qualified file.

Returns:
The length, as determined by the operating system, of the current file.

virtual std::string FileFinder::getFileName (  )  const [pure virtual]

Get the filename, without any path information, of the current qualified file.

Returns:
The name of the current file.

virtual std::string FileFinder::getFilePath (  )  const [pure virtual]

Get the path information of the current qualified file.

Returns:
The path of the current file.

virtual bool FileFinder::getFileTitle ( std::string &  fileTitle  )  const [pure virtual]

Get the filename, without any path or extension information, of the current qualified file.

Parameters:
fileTitle The name of the current file.
Returns:
True if the current file title was successfully set, otherwise false.

virtual bool FileFinder::getFullPath ( std::string &  fullFilePath  )  const [pure virtual]

Get the filename and path information, of the current qualified file.

Parameters:
fullFilePath The full path of the current file.
Returns:
True if the full path of the current file was successfully set, otherwise false.

virtual void FileFinder::getLastAccessTime ( DateTime dt  )  const [pure virtual]

Get the last access time of the current qualified file.

Parameters:
dt The date/time of last access, as determined by the operating system, of the current file.

virtual void FileFinder::getLastModificationTime ( DateTime dt  )  const [pure virtual]

Get the last modification time of the current qualified file.

Parameters:
dt The date/time of last change, as determined by the operating system, of the current file.

virtual bool FileFinder::isDots (  )  const [pure virtual]

Determine if the entry is either the current or parent directory.

Returns:
True if the current file is either "." or ".."

virtual bool FileFinder::isDirectory (  )  const [pure virtual]

Determine if the entry is a directory.

Returns:
True if the current file is a directory.

virtual bool FileFinder::isReadOnly (  )  const [pure virtual]

Determine if the current entry is read-only.

Returns:
True if the current file is read-only for the current user.


Software Development Kit - Opticks 4.9.0 Build 16218