Mobile API Reference  MicroStrategy 2019
MFileSystem Namespace Reference

Classes

class  CloseFileDescriptor
 
class  CloseFileStream
 
class  Directory
 
class  File
 
class  FileImpl
 
class  GenericFile
 
class  Initializer
 
class  InprocessFileLocker
 
class  ModuleMain
 
class  Path
 
class  ReadableFile
 
class  ReadableFileImpl
 
class  StrongFileDescriptor
 
class  StrongFilename
 
class  UpdateableFile
 
class  UpdateableFileImpl
 
class  WriteableFile
 
class  WriteableFileImpl
 

Typedefs

typedef MBase::StrongObj< FILE *, CloseFileStreamStrongFileStream
 
typedef MBase::String Exception
 
typedef int FileHandle
 

Enumerations

enum  IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED { IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_TRUNCATE_FILE, IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_DELETE_FILE, IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_PRESERVE_FILE }
 

Functions

DLL_FILE_SYSTEM_EXIM MBase::ReturnString GetCurrentWorkingDirectory ()
 
DLL_FILE_SYSTEM_EXIM void SetCurrentWorkingDirectory (const char *ipPath)
 
DLL_FILE_SYSTEM_EXIM MBase::ReturnString GetTemporaryPath ()
 
DLL_FILE_SYSTEM_EXIM ReadableFile::ReturnPtr OpenReadableFile (const char *ipPath)
 
DLL_FILE_SYSTEM_EXIM ReadableFile::ReturnPtr OpenReadableFile_InProcessLockNoWait (const char *ipPath)
 
DLL_FILE_SYSTEM_EXIM UpdateableFile::ReturnPtr OpenUpdateableFile (const char *ipPath, IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED iWhatToDoIfCommitAndCloseWasNotCalled)
 
DLL_FILE_SYSTEM_EXIM WriteableFile::ReturnPtr OpenWriteableFile (const char *ipPath, IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED iWhatToDoIfCommitAndCloseWasNotCalled)
 

Variables

MBase::ModuleMainPtr< ModuleMaingModuleMainPtr
 

Detailed Description

FileSystem is a constellation that puts together functions that manipulate directories and files. It is not intended to replace or be used instead of the standard stream libraries and such. But rather, it is intended to cover gaping holes in non-standard or OS-dependent functionality.

Typedef Documentation

◆ Exception

◆ FileHandle

◆ StrongFileStream

Enumeration Type Documentation

◆ IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED

Enumerator
IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_TRUNCATE_FILE 

NOTE: You must call CommitAndClose after the changes to the file.

IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_DELETE_FILE 
IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED_THEN_PRESERVE_FILE 

Function Documentation

◆ GetCurrentWorkingDirectory()

DLL_FILE_SYSTEM_EXIM MBase::ReturnString MFileSystem::GetCurrentWorkingDirectory ( )

Returns the current working directory. Throws an exception if current working directory cannot be retrieved.

Returns
absolute path.
Exceptions
MBase::FileSystemException()

◆ GetTemporaryPath()

DLL_FILE_SYSTEM_EXIM MBase::ReturnString MFileSystem::GetTemporaryPath ( )

Returns the path for temporary files.

◆ OpenReadableFile()

DLL_FILE_SYSTEM_EXIM ReadableFile::ReturnPtr MFileSystem::OpenReadableFile ( const char *  ipPath)

Opens a file and returns the ReadableFile object.

Exceptions
MBase::BaseExceptionif file cannot be opened (file does not exist, access denied, etc.)

◆ OpenReadableFile_InProcessLockNoWait()

DLL_FILE_SYSTEM_EXIM ReadableFile::ReturnPtr MFileSystem::OpenReadableFile_InProcessLockNoWait ( const char *  ipPath)

Opens a file and returns the ReadableFile object.

Exceptions
MBase::BaseExceptionif file cannot be opened (file does not exist or is already locked by writing)

◆ OpenUpdateableFile()

DLL_FILE_SYSTEM_EXIM UpdateableFile::ReturnPtr MFileSystem::OpenUpdateableFile ( const char *  ipPath,
IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED  iWhatToDoIfCommitAndCloseWasNotCalled 
)

◆ OpenWriteableFile()

DLL_FILE_SYSTEM_EXIM WriteableFile::ReturnPtr MFileSystem::OpenWriteableFile ( const char *  ipPath,
IF_COMMIT_AND_CLOSE_WAS_NOT_CALLED  iWhatToDoIfCommitAndCloseWasNotCalled 
)

Opens (or creates if necessary) a file and returns the WriteableFile object.

Exceptions
MBase::BaseExceptionif file cannot be opened/created (access denied, etc.)

◆ SetCurrentWorkingDirectory()

DLL_FILE_SYSTEM_EXIM void MFileSystem::SetCurrentWorkingDirectory ( const char *  ipPath)

Sets the current working directory.

Parameters
ipPathan absolute path.
Exceptions
MBase::FileSystemException()

Variable Documentation

◆ gModuleMainPtr

MBase::ModuleMainPtr< ModuleMain > MFileSystem::gModuleMainPtr