File handle.
More...
#include <iaFile.h>
◆ iaFile()
iaux::iaFile::iaFile |
( |
const iaString & |
fileName | ) |
|
creates an object for a file
- Parameters
-
fileName | the path to the file associated with this object |
◆ ~iaFile()
iaux::iaFile::~iaFile |
( |
| ) |
|
automatic closes the file if not closed yet
◆ close()
void iaux::iaFile::close |
( |
| ) |
|
◆ copy()
copys the file to a new destination
- Parameters
-
newFileName | name of copy destination |
◆ exists() [1/2]
bool iaux::iaFile::exists |
( |
| ) |
const |
checks if the file exist
- Returns
- true: if file exists; false: if not
◆ exists() [2/2]
bool iaux::iaFile::exists |
( |
const iaString & |
filename | ) |
|
|
static |
checks if some file exist
- Parameters
-
filename | the file to be checked for |
- Returns
- true: if file exists; false: if not
◆ getExtension()
iaString iaux::iaFile::getExtension |
( |
| ) |
const |
- Returns
- the file extension
◆ getFileName()
iaString iaux::iaFile::getFileName |
( |
| ) |
const |
◆ getFileOpenMode()
- Returns
- the file open mode if open
◆ getFullFileName()
iaString iaux::iaFile::getFullFileName |
( |
| ) |
const |
- Returns
- the full path & filename
◆ getLastModifiedTime() [1/2]
iaTime iaux::iaFile::getLastModifiedTime |
( |
| ) |
const |
- Returns
- last modified time of file
◆ getLastModifiedTime() [2/2]
- Returns
- last modified time of file
- Parameters
-
filename | the given filename |
◆ getPath()
iaString iaux::iaFile::getPath |
( |
| ) |
const |
- Returns
- only the parent path
◆ getSize()
int64 iaux::iaFile::getSize |
( |
| ) |
const |
- Returns
- the size of the file
◆ getStem()
iaString iaux::iaFile::getStem |
( |
| ) |
const |
- Returns
- filename without extension
◆ isOpen()
bool iaux::iaFile::isOpen |
( |
| ) |
const |
- Returns
- true: if the file is open; false: if the file is closed
◆ open()
opens the file with the needed rights
- Parameters
-
◆ read()
bool iaux::iaFile::read |
( |
int32 |
size, |
|
|
char * |
destination, |
|
|
int64 |
offset = -1 |
|
) |
| |
reads from offset the number of size bytes to a (allocated) destination
- Parameters
-
offset | the offset to start reading from (-1 reads from current file pointer position) |
size | size in bytes to read |
destination | the destination to write to |
◆ remove()
bool iaux::iaFile::remove |
( |
const iaString & |
filename | ) |
|
|
static |
deletes/removes file from filesystem
- Parameters
-
filename | the file to remove |
◆ rename()
void iaux::iaFile::rename |
( |
const iaString & |
newFileName, |
|
|
bool |
replaceExisting = false |
|
) |
| |
renames the file to a new name
- Parameters
-
newFileName | the new file name |
replaceExisting | true: destination will be replaced; false: no action will be taken if destination already exists |
◆ setFilePointer()
bool iaux::iaFile::setFilePointer |
( |
int64 |
position | ) |
|
|
protected |
sets the file pointer to a destination
- Parameters
-
position | new absolute position of filepointer |
◆ setSize()
bool iaux::iaFile::setSize |
( |
int64 |
size | ) |
|
resizes the file
- Parameters
-
newSize | the new size of the file |
- Returns
- true: success; false: fail
◆ write()
bool iaux::iaFile::write |
( |
int32 |
size, |
|
|
const char * |
source, |
|
|
int64 |
offset = -1 |
|
) |
| |
writes from offset the number of size bytes from a destination
- Parameters
-
offset | the offset to start writing to (-1 writes at current file pointer position) |
size | size in bytes to write |
source | the source to read from |
The documentation for this class was generated from the following files:
- /home/maddin/dev/Igor/src/iaux/iaux/system/iaFile.h
- /home/maddin/dev/Igor/src/iaux/iaux/system/iaFile.cpp