Nebula
|
#include <ioserver.h>
The central server object of the IO subsystem offers the following services:
associate stream classes with URI schemes create the right stream object for a given URI transparant (ZIP) archive support path assign management global filesystem manipulation and query methods
Inherits Core::RefCounted.
Public Member Functions | |
IoServer () | |
constructor | |
virtual | ~IoServer () |
destructor | |
bool | MountArchive (const URI &uri) |
mount a file archive (without archive file extension!) | |
bool | MountEmbeddedArchive (const URI &uri) |
mount an embedded file archive | |
void | UnmountArchive (const URI &uri) |
unmount a file archive (without archive file extension!) | |
bool | IsArchiveMounted (const URI &uri) const |
return true if a archive is mounted (without archive file extension!) | |
void | SetArchiveFileSystemEnabled (bool b) |
enable/disable transparent archive filesystem layering (default is yes) | |
bool | IsArchiveFileSystemEnabled () const |
return true if transparent archive filesystem is enabled | |
void | MountStandardArchives () |
mount standard archives (e.g. home:export.zip and home:export_$(platform).zip) | |
void | UnmountStandardArchives () |
unmount standard archives | |
Ptr< Stream > | CreateStream (const URI &uri) const |
create a stream object for the given uri | |
bool | CreateDirectory (const URI &uri) const |
create all missing directories in the path | |
bool | DeleteDirectory (const URI &path) const |
delete an empty directory | |
bool | DirectoryExists (const URI &path) const |
return true if directory exists | |
bool | CopyFile (const URI &from, const URI &to) const |
copy a file | |
bool | DeleteFile (const URI &path) const |
delete a file | |
bool | FileExists (const URI &path) const |
return true if file exists | |
bool | IsLocked (const URI &path) const |
return if file is locked | |
void | SetReadOnly (const URI &path, bool b) const |
set the readonly status of a file | |
bool | IsReadOnly (const URI &path) const |
return read only status of a file | |
unsigned int | ComputeFileCrc (const URI &path) const |
get the CRC checksum of a file | |
void | SetFileWriteTime (const URI &path, FileTime fileTime) |
set the write-time of a file | |
FileTime | GetFileWriteTime (const URI &path) const |
return the last write-time of a file | |
Util::Array< Util::String > | ListFiles (const URI &dir, const Util::String &pattern, bool asFullPath=false) const |
list all files matching a pattern in a directory | |
Util::Array< Util::String > | ListDirectories (const URI &dir, const Util::String &pattern, bool asFullPath=false, bool prioritizeArchive=true) const |
list all subdirectories matching a pattern in a directory | |
URI | CreateTemporaryFilename (const URI &path) const |
create a temporary file name | |
Public Member Functions inherited from Core::RefCounted | |
RefCounted () | |
constructor | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Static Public Member Functions | |
static bool | ReadFile (const URI &path, Util::String &contents) |
read contents of file and return as string | |
static Util::String | NativePath (const Util::String &path) |
return native path | |
Static Public Member Functions inherited from Core::RefCounted | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Private Member Functions | |
__DeclareClass (IoServer) | |
__DeclareSingleton (IoServer) | |
Util::Array< Util::String > | AddPathPrefixToArray (const Util::String &prefix, const Util::Array< Util::String > &filenames) const |
helper function to add path prefix to file or dir names in array | |
Private Attributes | |
bool | archiveFileSystemEnabled |
Ptr< ArchiveFileSystem > | archiveFileSystem |
Ptr< Http::HttpClientRegistry > | httpClientRegistry |
Ptr< AssignRegistry > | assignRegistry |
Ptr< SchemeRegistry > | schemeRegistry |
Ptr< FileWatcher > | watcher |
Ptr< StreamCache > | streamCache |
Static Private Attributes | |
static Threading::CriticalSection | archiveCriticalSection |
static bool | StandardArchivesMounted = false |
static Threading::CriticalSection | assignCriticalSection |
static Threading::CriticalSection | schemeCriticalSection |
static Threading::CriticalSection | watcherCriticalSection |
Additional Inherited Members | |
Protected Member Functions inherited from Core::RefCounted | |
virtual | ~RefCounted () |
destructor (called when refcount reaches zero) | |
IO::IoServer::IoServer | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
|
private |
helper function to add path prefix to file or dir names in array
unsigned int IO::IoServer::ComputeFileCrc | ( | const URI & | path | ) | const |
get the CRC checksum of a file
This method computes the CRC checksum for a file.
copy a file
This copies a file to another file.
bool IO::IoServer::CreateDirectory | ( | const URI & | uri | ) | const |
create all missing directories in the path
This method creates all missing directories in a path.
create a stream object for the given uri
create a temporary file name
bool IO::IoServer::DeleteDirectory | ( | const URI & | path | ) | const |
delete an empty directory
bool IO::IoServer::DeleteFile | ( | const URI & | path | ) | const |
delete a file
bool IO::IoServer::DirectoryExists | ( | const URI & | path | ) | const |
return true if directory exists
bool IO::IoServer::FileExists | ( | const URI & | path | ) | const |
return true if file exists
return the last write-time of a file
|
inline |
bool IO::IoServer::IsArchiveMounted | ( | const URI & | uri | ) | const |
return true if a archive is mounted (without archive file extension!)
bool IO::IoServer::IsLocked | ( | const URI & | path | ) | const |
return if file is locked
bool IO::IoServer::IsReadOnly | ( | const URI & | path | ) | const |
return read only status of a file
Array< String > IO::IoServer::ListDirectories | ( | const URI & | dir, |
const Util::String & | pattern, | ||
bool | asFullPath = false, | ||
bool | prioritizeArchive = true ) const |
list all subdirectories matching a pattern in a directory
Array< String > IO::IoServer::ListFiles | ( | const URI & | dir, |
const Util::String & | pattern, | ||
bool | asFullPath = false ) const |
list all files matching a pattern in a directory
bool IO::IoServer::MountArchive | ( | const URI & | uri | ) |
mount a file archive (without archive file extension!)
bool IO::IoServer::MountEmbeddedArchive | ( | const URI & | uri | ) |
mount an embedded file archive
void IO::IoServer::MountStandardArchives | ( | ) |
mount standard archives (e.g. home:export.zip and home:export_$(platform).zip)
|
static |
return native path
|
static |
read contents of file and return as string
|
inline |
enable/disable transparent archive filesystem layering (default is yes)
set the write-time of a file
void IO::IoServer::SetReadOnly | ( | const URI & | path, |
bool | b ) const |
set the readonly status of a file
void IO::IoServer::UnmountArchive | ( | const URI & | uri | ) |
unmount a file archive (without archive file extension!)
void IO::IoServer::UnmountStandardArchives | ( | ) |
unmount standard archives
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |
|
staticprivate |