Nebula
Loading...
Searching...
No Matches
OSX::OSXFSWrapper Class Reference

#include <osxfswrapper.h>

Detailed Description

Internal filesystem wrapper for the OSX.

(C) 2010 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Public Types

typedef FILE * Handle
 

Static Public Member Functions

static Handle OpenFile (const Util::String &path, IO::Stream::AccessMode accessMode, IO::Stream::AccessPattern accessPattern)
 open a file
 
static void CloseFile (Handle h)
 close a file
 
static void Write (Handle h, const void *buf, IO::Stream::Size numBytes)
 write to a file
 
static IO::Stream::Size Read (Handle h, void *buf, IO::Stream::Size numBytes)
 read from a file
 
static void Seek (Handle h, IO::Stream::Offset offset, IO::Stream::SeekOrigin orig)
 seek in a file
 
static IO::Stream::Position Tell (Handle h)
 get position in file
 
static void Flush (Handle h)
 flush a file
 
static bool Eof (Handle h)
 return true if at end-of-file
 
static IO::Stream::Size GetFileSize (Handle h)
 get size of a file in bytes
 
static void SetReadOnly (const Util::String &path, bool readOnly)
 set read-only status of a file
 
static bool IsReadOnly (const Util::String &path)
 get read-only status of a file
 
static bool DeleteFile (const Util::String &path)
 delete a file
 
static bool DeleteDirectory (const Util::String &path)
 delete an empty directory
 
static bool FileExists (const Util::String &path)
 return true if a file exists
 
static bool DirectoryExists (const Util::String &path)
 return true if a directory exists
 
static void SetFileWriteTime (const Util::String &path, IO::FileTime fileTime)
 set the write-access time stamp of a file
 
static IO::FileTime GetFileWriteTime (const Util::String &path)
 get the last write-access time stamp of a file
 
static bool CreateDirectory (const Util::String &path)
 create a directory
 
static Util::Array< Util::StringListFiles (const Util::String &dirPath, const Util::String &pattern)
 list all files in a directory
 
static Util::Array< Util::StringListDirectories (const Util::String &dirPath, const Util::String &pattern)
 list all subdirectories in a directory
 
static Util::String GetUserDirectory ()
 get path to the current user's home directory (for user: standard assign)
 
static Util::String GetAppDataDirectory ()
 get path to the current user's appdata directory (for appdata: standard assign)
 
static Util::String GetTempDirectory ()
 get path to the current user's temp directory (for temp: standard assign)
 
static Util::String GetHomeDirectory ()
 get path to the current application directory (for home: standard assign)
 
static Util::String GetBinDirectory ()
 get path to the current bin directory (for bin: standard assign)
 
static Util::String GetProgramsDirectory ()
 get path to the "c:/program files" directory
 
static bool IsDeviceName (const Util::String &str)
 return true when the string is a device name (e.g. "C:")
 
static const char * ConvertPath (const Util::String &str)
 skips the OSX: at the start of the path
 

Member Typedef Documentation

◆ Handle

Member Function Documentation

◆ CloseFile()

void OSX::OSXFSWrapper::CloseFile ( Handle h)
static

close a file

◆ ConvertPath()

const char * OSX::OSXFSWrapper::ConvertPath ( const Util::String & str)
static

skips the OSX: at the start of the path

◆ CreateDirectory()

bool OSX::OSXFSWrapper::CreateDirectory ( const Util::String & path)
static

create a directory

◆ DeleteDirectory()

bool OSX::OSXFSWrapper::DeleteDirectory ( const Util::String & path)
static

delete an empty directory

◆ DeleteFile()

bool OSX::OSXFSWrapper::DeleteFile ( const Util::String & path)
static

delete a file

◆ DirectoryExists()

bool OSX::OSXFSWrapper::DirectoryExists ( const Util::String & path)
static

return true if a directory exists

◆ Eof()

bool OSX::OSXFSWrapper::Eof ( Handle h)
static

return true if at end-of-file

◆ FileExists()

bool OSX::OSXFSWrapper::FileExists ( const Util::String & path)
static

return true if a file exists

◆ Flush()

void OSX::OSXFSWrapper::Flush ( Handle h)
static

flush a file

◆ GetAppDataDirectory()

String OSX::OSXFSWrapper::GetAppDataDirectory ( )
static

get path to the current user's appdata directory (for appdata: standard assign)

◆ GetBinDirectory()

String OSX::OSXFSWrapper::GetBinDirectory ( )
static

get path to the current bin directory (for bin: standard assign)

◆ GetFileSize()

Stream::Size OSX::OSXFSWrapper::GetFileSize ( Handle h)
static

get size of a file in bytes

◆ GetFileWriteTime()

FileTime OSX::OSXFSWrapper::GetFileWriteTime ( const Util::String & path)
static

get the last write-access time stamp of a file

◆ GetHomeDirectory()

String OSX::OSXFSWrapper::GetHomeDirectory ( )
static

get path to the current application directory (for home: standard assign)

◆ GetProgramsDirectory()

String OSX::OSXFSWrapper::GetProgramsDirectory ( )
static

get path to the "c:/program files" directory

◆ GetTempDirectory()

String OSX::OSXFSWrapper::GetTempDirectory ( )
static

get path to the current user's temp directory (for temp: standard assign)

◆ GetUserDirectory()

String OSX::OSXFSWrapper::GetUserDirectory ( )
static

get path to the current user's home directory (for user: standard assign)

◆ IsDeviceName()

bool OSX::OSXFSWrapper::IsDeviceName ( const Util::String & str)
static

return true when the string is a device name (e.g. "C:")

◆ IsReadOnly()

bool OSX::OSXFSWrapper::IsReadOnly ( const Util::String & path)
static

get read-only status of a file

◆ ListDirectories()

Array< String > OSX::OSXFSWrapper::ListDirectories ( const Util::String & dirPath,
const Util::String & pattern )
static

list all subdirectories in a directory

◆ ListFiles()

Array< String > OSX::OSXFSWrapper::ListFiles ( const Util::String & dirPath,
const Util::String & pattern )
static

list all files in a directory

◆ OpenFile()

OSXFSWrapper::Handle OSX::OSXFSWrapper::OpenFile ( const Util::String & path,
IO::Stream::AccessMode accessMode,
IO::Stream::AccessPattern accessPattern )
static

open a file

◆ Read()

Stream::Size OSX::OSXFSWrapper::Read ( Handle h,
void * buf,
IO::Stream::Size numBytes )
static

read from a file

◆ Seek()

void OSX::OSXFSWrapper::Seek ( Handle h,
IO::Stream::Offset offset,
IO::Stream::SeekOrigin orig )
static

seek in a file

◆ SetFileWriteTime()

void OSX::OSXFSWrapper::SetFileWriteTime ( const Util::String & path,
IO::FileTime fileTime )
static

set the write-access time stamp of a file

◆ SetReadOnly()

void OSX::OSXFSWrapper::SetReadOnly ( const Util::String & path,
bool readOnly )
static

set read-only status of a file

◆ Tell()

Stream::Position OSX::OSXFSWrapper::Tell ( Handle h)
static

get position in file

◆ Write()

void OSX::OSXFSWrapper::Write ( Handle h,
const void * buf,
IO::Stream::Size numBytes )
static

write to a file


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