Mobile API Reference
MicroStrategy 2019
|
#include <File.h>
Classes | |
class | ReadSmartLock |
class | WriteSmartLock |
Static Public Member Functions | |
static void | Move (const char *ipPathFrom, const char *ipPathTo) |
static bool | Delete (const char *ipPath) |
static void | Copy (const char *ipPathFrom, const char *ipPathTo, MDataType::Binary &irBinary) |
static void | Copy (const char *ipPathFrom, const char *ipPathTo) |
This method allocates a default-size buffer (~16KB). More... | |
static bool | CopyAttributes (const char *ipPathFrom, const char *ipPathTo) |
This method copies file attributes. More... | |
static off_t | GetSize (const char *ipPath) |
static void | GetLastModified (const char *ipPath, MDataType::DateTime &orDateTime) |
static FILE * | OpenStream (const char *ipPath, OpenMode iOpenMode, ShareMode iShareMode=SHARE_MODE_DEFAULT) |
static void | Copy (int iDescriptorFrom, int iDescriptorTo, MDataType::Binary &irBinary) |
static void | Copy (FILE *ipStreamFrom, FILE *ipStreamTo, MDataType::Binary &irBinary) |
static void | Copy (int iDescriptorFrom, const char *ipPathTo) |
This is a convenience method for backward compatibility. More... | |
static void | Copy (FILE *ipStreamFrom, const char *ipPathTo) |
This is a convenience method for backward compatibility. More... | |
static off_t | GetSize (int inDescriptor) |
static off_t | GetSize (FILE *ipStream) |
static void | Write (FILE *ipStream, const char *ipString, size_t iLength=0) |
static void | Write (FILE *ipStream, const void *ipData, size_t iByteLength) |
static void | Read (FILE *ipStream, MDataType::Binary &irBinary, size_t iMaxSize=0) |
static void | ReadLine (FILE *ipStream, MDataType::Binary &irBinary) |
static void | Flush (int iDescriptor) |
static void | Flush (FILE *ipStream) |
static void | Truncate (int iDescriptor, off_t iSize=0) |
static void | Truncate (FILE *ipStream, off_t iSize=0) |
static off_t | GetPosition (int iDescriptor) |
static off_t | GetPosition (FILE *ipStream) |
static void | MovePosition (int iDescriptor, off_t iOffset) |
static void | MovePosition (FILE *ipStream, off_t iOffset) |
static void | SetPosition (int iDescriptor, off_t iOffset) |
static void | SetPosition (FILE *ipStream, off_t iOffset) |
static void | CopyBlock (FILE *ipStream, MDataType::Binary &irBinary, off_t iTo, off_t iSize=0) |
Static Protected Member Functions | |
static void | WriteLock (int iDescriptor, bool bIsWait=true) |
static void | ReadLock (int iDescriptor, bool bIsWait=true) |
static void | Unlock (int iDescriptor) throw () |
Friends | |
class | WriteSmartLock |
class | ReadSmartLock |
class | ReadableFileImpl |
class | WriteableFileImpl |
File contains functions operating upon a file.
Defines a mode for opening a file.
The available modes correspond to the values of the second parameter to fopen(), which, in turn, translate into the low level file-open flags defined in <fcntl.h>.
Enumerator | |
---|---|
OPEN_MODE_READ | |
OPEN_MODE_WRITE_FROM_SCRATCH | |
OPEN_MODE_WRITE_APPEND | |
OPEN_MODE_UPDATE_EXISTING | |
OPEN_MODE_UPDATE_FROM_SCRATCH | |
OPEN_MODE_UPDATE_APPEND | |
OPEN_MODE_WRITE |
|
static |
Reads data from one descriptor/stream/path and writes that data into the other descriptor/stream using the Binary as a buffer.
Note: reading starts at the current position and continues until the end of file.
iDescriptorFrom/ipStreamFrom/ipPathFrom | is the source. |
iDescriptorTo/ipStreamTo/ipPathTo | is the destination. |
irBinary | used as a buffer for copying. |
|
static |
This method allocates a default-size buffer (~16KB).
|
static |
Reads data from one descriptor/stream/path and writes that data into the other descriptor/stream using the Binary as a buffer.
Note: reading starts at the current position and continues until the end of file.
iDescriptorFrom/ipStreamFrom/ipPathFrom | is the source. |
iDescriptorTo/ipStreamTo/ipPathTo | is the destination. |
irBinary | used as a buffer for copying. |
|
static |
|
static |
This is a convenience method for backward compatibility.
|
static |
This is a convenience method for backward compatibility.
|
static |
This method copies file attributes.
|
static |
Copies the data block at current position to iTo preserving the data if source and destination locations overlap.
iSize | is block size, if 0, the size is calculated as (file size - iFrom) |
irBinary | used as a buffer for data copying |
|
static |
Deletes a file. Does not throw any exceptions.
|
static |
Flushes a file descriptor/stream.
|
static |
|
static |
Returns the UTC time of last modification.
|
static |
Returns the curent file position.
|
static |
|
static |
Returns size of the specified file.
|
static |
Returns size of the specified file.
|
static |
|
static |
Moves a file/directory.
The function overwrites the target if it exists.
|
static |
Moves the file pointer relative to the current position.
|
static |
Moves the file pointer relative to the current position. Also if successful, this method clears the end-of-file indicator and any prior ungetc calls with this stream.
|
static |
Platform-independent way to open a file descriptor.
Note: on Windows, all files are opened in "binary" mode; the "text" mode is dead.
Use the file descriptor with *fstream classes defined in <fstream.h>, with their constructor.
Note: on Windows, all files are opened in "binary" mode; the "text" mode is dead.
|
static |
Read raw data from a file stream. GetSize method of irBinary returns the number of bytes read.
iMaxSize | how many bytes to read, if 0 maximum capacity of irBinary is read. |
|
static |
Read new-line delimited data from a file stream. The new-line character is preserved. If the last returned character is not '
', then there is more data to be read.
|
staticprotected |
|
static |
Moves the file pointer to the absolute position.
|
static |
Moves the file pointer to the absolute position. Also if successful, this method clears the end-of-file indicator and any prior ungetc calls with this stream.
|
static |
Truncates a file (changes file's size) to specified size.
|
static |
|
staticprotected |
|
static |
Writes a null-terminated character string into a file stream. If iLength is 0, the function writes ::strlen() characters, otherwise, it uses the provided value of iLength.
NOTE: it is required on most platforms to "flush" a buffered stream after writing and before reading/seeking. Otherwise, either SetPosition will fail, or the resulting file will be corrupt.
|
static |
Writes raw data into a file stream.
|
staticprotected |
|
friend |
|
friend |
|
friend |
|
friend |