28#ifndef __FileSystem_H__
29#define __FileSystem_H__
101 bool dirs =
false)
const;
Abstract factory class, archive codec plugins can register concrete subclasses of this.
Archive(const String &name, const String &archType)
Constructor - don't call direct, used by ArchiveFactory.
Specialisation of ArchiveFactory for FileSystem files.
void destroyInstance(Archive *ptr)
Destroys an object which was created by this factory.
const String & getType(void) const
Returns the factory type.
virtual ~FileSystemArchiveFactory()
Archive * createInstance(const String &name, bool readOnly)
Creates a new object.
Specialisation of the Archive class to allow reading of files from filesystem folders / directories.
static bool msIgnoreHidden
time_t getModifiedTime(const String &filename)
Retrieve the modification time of a given file.
DataStreamPtr open(const String &filename, bool readOnly=true) const
Open a stream on a given file.
StringVectorPtr find(const String &pattern, bool recursive=true, bool dirs=false)
Find all file or directory names matching a given pattern in this archive.
bool isCaseSensitive(void) const
Returns whether this archive is case sensitive in the way it matches files.
StringVectorPtr list(bool recursive=true, bool dirs=false)
List all file names in the archive.
void remove(const String &filename) const
Delete a named file.
static bool getIgnoreHidden()
Get whether hidden files are ignored during filesystem enumeration.
void findFiles(const String &pattern, bool recursive, bool dirs, StringVector *simpleList, FileInfoList *detailList) const
Utility method to retrieve all files in a directory matching pattern.
void unload()
Unloads the archive.
DataStreamPtr create(const String &filename) const
Create a new file (or overwrite one already there).
FileSystemArchive(const String &name, const String &archType, bool readOnly)
static void setIgnoreHidden(bool ignore)
Set whether filesystem enumeration will include hidden files or not.
FileInfoListPtr listFileInfo(bool recursive=true, bool dirs=false)
List all files in the archive with accompanying information.
FileInfoListPtr findFileInfo(const String &pattern, bool recursive=true, bool dirs=false) const
Find all files or directories matching a given pattern in this archive and get some detailed informat...
void load()
Loads the archive.
bool exists(const String &filename)
Find out if the named file exists (note: fully qualified filename required)
vector< String >::type StringVector
SharedPtr< StringVector > StringVectorPtr
vector< FileInfo >::type FileInfoList
SharedPtr< DataStream > DataStreamPtr
Shared pointer to allow data streams to be passed around without worrying about deallocation.
SharedPtr< FileInfoList > FileInfoListPtr