FileIO is a simple cross-platform API for reading and writing files from the filesystem.
More...
Go to the source code of this file.
|
| typedef struct losFileHandle_T * | losFileHandle |
| | this is the Library object that is used to read and write files from the filesystem as the user only holds a pointer to the library object that is controlled by the library. More...
|
| |
|
typedef enum losFileBits | losFileBits |
| | losFileBits is used for file object flags
|
| |
|
typedef struct losFileOpenInfo | losFileOpenInfo |
| | losFileOpenInfo is the file creation struct we pass this into the creation function for the library to create a file object
|
| |
FileIO is a simple cross-platform API for reading and writing files from the filesystem.
- Author
- Luke Shore luket.nosp@m.hemo.nosp@m.dded@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.2
- Date
- 05/6/2022
◆ losFileHandle
this is the Library object that is used to read and write files from the filesystem as the user only holds a pointer to the library object that is controlled by the library.
Importation of libraries
◆ losFileBits
losFileBits is used for file object flags
| Enumerator |
|---|
| LOS_FILE_BIT_READ | Read file flag bit.
|
| LOS_FILE_BIT_WRITE | Write file flag bit.
|
| LOS_FILE_BIT_BINARY | Binary aka library handle file flag bit (NOT_IMPLEMENTED)
|
| LOS_FILE_BIT_UNICODE | Unicode file flag bit.
|
| LOS_FILE_BIT_CREATE | Create file if does not exist flag bit.
|
| LOS_FILE_BIT_DELETE_AFTER_CLOSE | Tells the library to delete the file after using it flag bit.
|
| LOS_FILE_BIT_FLIP_ENDIAN | Flip the file's read bits from the original flag bit (NOT_IMPLEMENTED)
|
◆ losCloseFile()
losCloseFile is to close the library object and safely delete it
- Parameters
-
- Returns
- losResult
◆ losDoseFileExist()
losDoseFileExist can be used to check if the file exists will return LOS_SUCCESS if the file exists else it will return LOS_ERROR_MALFORMED_DATA
- Parameters
-
- Returns
- losResult
◆ losGetFuncAddress()
losGetFuncAddress extracts the function memory address loaded when the LOS_FILE_BIT_BINARY is set
- Parameters
-
- Returns
- address
◆ losOpenFile()
losOpenFile is to create the library object but dose not release the object to the library user
- Parameters
-
| [out] | handle | |
| [in] | file_info | |
- Returns
- losResult
◆ losReadFile()
losReadFile read data to native file held by the library object when in unicode mode it will return wchar_t data encoding from the read
- Parameters
-
| [in] | handle | |
| [out] | buffer | |
| [out] | bytes_read | |
- Returns
- losResult
◆ losSetAssetPath()
losSetAssetPath can be used to set the full data path for $[asset_base]
- Parameters
-
- Returns
- losResult
◆ losWriteFile()
losWriteFile write data to native file held by the library object when in unicode mode it expects wchar_t data encoding to write
- Parameters
-
| [in] | handle | |
| [in] | buffer | |
| [in] | buffer_size | |
- Returns
- losResult