Data Structures | |
| struct | NvOsStatTypeRec |
Macros | |
| #define | NVOS_OPEN_READ (0x1U) |
| #define | NVOS_OPEN_WRITE (0x2U) |
| #define | NVOS_OPEN_CREATE (0x4U) |
| #define | NVOS_OPEN_APPEND (0x8U) |
Typedefs | |
| typedef void * | NvOsDirHandle |
| typedef struct NvOsFileRec * | NvOsFileHandle |
| typedef struct NvOsStatTypeRec | NvOsStatType |
Enumerations | |
| enum | NvOsFileType { NvOsFileType_Unknown = 0, NvOsFileType_File = 1, NvOsFileType_Directory = 2, NvOsFileType_Fifo = 3, NvOsFileType_CharacterDevice = 4, NvOsFileType_BlockDevice = 5, NvOsFileType_Force32 = 0x7FFFFFFF } |
| enum | NvOsSeekEnum { NvOsSeek_Set = 0, NvOsSeek_Cur = 1, NvOsSeek_End = 2, NvOsSeek_Force32 = 0x7FFFFFFF } |
Functions | |
| NvError | NvOsOpendir (const char *path, NvOsDirHandle *dir) |
| This function opens a directory. More... | |
| void | NvOsClosedir (NvOsDirHandle dir) |
| This function closes a directory. More... | |
| NvError | NvOsFgetc (NvOsFileHandle hFile, NvU8 *c) |
| This function read a character from the current position of a file stream,and the read character is stored into c parameter. More... | |
| NvError | NvOsFopen (const char *path, NvU32 flags, NvOsFileHandle *file) |
| This function opens a file stream from path parameter. More... | |
| NvError | NvOsFcloseEx (NvOsFileHandle hFile) |
| This function closes a file stream. More... | |
| NvError | NvOsFread (NvOsFileHandle hFile, void *ptr, size_t size, size_t *bytes) |
| This function read from a file stream and store to ptr parameter. More... | |
| NvError | NvOsFseek (NvOsFileHandle hFile, NvS64 offset, NvOsSeekEnum whence) |
| This function changes the current position of file stream as it is specified by offset and whence parameter. More... | |
| NvError | NvOsFstat (NvOsFileHandle hFile, NvOsStatType *filestat) |
| This function gets a type of file stream, as file, directory, fifo, character device and unknown. More... | |
| NvError | NvOsFtell (NvOsFileHandle hFile, NvU64 *position) |
| This function gets the current position of file stream, and it is stored to position parameter as bytes. More... | |
| NvError | NvOsFwrite (NvOsFileHandle hFile, const void *ptr, size_t size) |
| This function writes the buffer to a file stream, and the length or writing is up to size parameter. More... | |
| NvError | NvOsFflush (NvOsFileHandle hFile) |
| This function flush a file stream, if there is any buffered/unwritten memory regarding the file stream. More... | |
| NvError | NvOsStat (const char *filename, NvOsStatType *filestat) |
| This function gets a type of path. More... | |
| #define NVOS_OPEN_APPEND (0x8U) |
Open file in append mode. Implies WRITE.
Definition at line 70 of file nvos_common_tegra_safety.h.
| #define NVOS_OPEN_CREATE (0x4U) |
Creates a file if is not present on the file system.
Definition at line 65 of file nvos_common_tegra_safety.h.
| #define NVOS_OPEN_READ (0x1U) |
Opens a file with read permissions.
Definition at line 55 of file nvos_common_tegra_safety.h.
| #define NVOS_OPEN_WRITE (0x2U) |
Opens a file with write persmissions.
Definition at line 60 of file nvos_common_tegra_safety.h.
| typedef void* NvOsDirHandle |
Directory Handle
Definition at line 75 of file nvos_common_tegra_safety.h.
| typedef struct NvOsFileRec* NvOsFileHandle |
File Handle
Definition at line 114 of file nvos_common_tegra_safety.h.
| typedef struct NvOsStatTypeRec NvOsStatType |
NvOsFileType is used as a parameter of NvOsStat() function to get the stat of given path
| enum NvOsFileType |
NvOsFileType is used as a parameter of NvOsStat() function to get the type of given path
| Enumerator | |
|---|---|
| NvOsFileType_Unknown | |
| NvOsFileType_File | |
| NvOsFileType_Directory | |
| NvOsFileType_Fifo | |
| NvOsFileType_CharacterDevice | |
| NvOsFileType_BlockDevice | |
| NvOsFileType_Force32 | |
Definition at line 81 of file nvos_common_tegra_safety.h.
| enum NvOsSeekEnum |
NvOsSeekEnum is used as a parameter of NvOsFseek() function to move the current position of file
| Enumerator | |
|---|---|
| NvOsSeek_Set | NvOS equivalent of SEEK_SET. |
| NvOsSeek_Cur | NvOS equivalent of SEEK_CUR. |
| NvOsSeek_End | NvOS equivalent of SEEK_END. |
| NvOsSeek_Force32 | Max value of NvOsSeekEnum. |
Definition at line 1847 of file nvos_common_tegra_safety.h.
| void NvOsClosedir | ( | NvOsDirHandle | dir | ) |
This function closes a directory.
| [in] | dir | Directory handle to be closed |
Usage considerations
| NvError NvOsFcloseEx | ( | NvOsFileHandle | hFile | ) |
This function closes a file stream.
| [in] | hFile | File stream to be closed |
Usage considerations
| NvError NvOsFflush | ( | NvOsFileHandle | hFile | ) |
This function flush a file stream, if there is any buffered/unwritten memory regarding the file stream.
| [in] | hFile | File stream to be flushed |
Usage considerations
| NvError NvOsFgetc | ( | NvOsFileHandle | hFile, |
| NvU8 * | c | ||
| ) |
This function read a character from the current position of a file stream,and the read character is stored into c parameter.
| [in] | hFile | File stream to read |
| [out] | c | To store a read character |
Usage considerations
| NvError NvOsFopen | ( | const char * | path, |
| NvU32 | flags, | ||
| NvOsFileHandle * | file | ||
| ) |
This function opens a file stream from path parameter.
| [in] | path | File path to open, passed to filename parameter of fopen() in QNX libc |
| [in] | flags | To describe an access mode, the combination of four flags can be used, please see note below for valid combinations. |
| [out] | file | Opened file stream |
Usage considerations
| NvError NvOsFread | ( | NvOsFileHandle | hFile, |
| void * | ptr, | ||
| size_t | size, | ||
| size_t * | bytes | ||
| ) |
This function read from a file stream and store to ptr parameter.
| [in] | hFile | File stream to read |
| [out] | ptr | To store what read from file stream |
| [in] | size | Maximum length of reading |
| [out] | bytes | Actual reading length is stored as byte |
Usage considerations
| NvError NvOsFseek | ( | NvOsFileHandle | hFile, |
| NvS64 | offset, | ||
| NvOsSeekEnum | whence | ||
| ) |
This function changes the current position of file stream as it is specified by offset and whence parameter.
| [in] | hFile | File stream to change the current position |
| [in] | offset | Offset from whence parameter |
| [in] | whence | NvOsSeek_Set from start of file, NvOsSeek_Cur from current position, NvOsSeek_End from the end of file |
Usage considerations
| NvError NvOsFstat | ( | NvOsFileHandle | hFile, |
| NvOsStatType * | filestat | ||
| ) |
This function gets a type of file stream, as file, directory, fifo, character device and unknown.
| [in] | hFile | File stream to get file type |
| [out] | filestat | type of file stream, please see note for more detail. |
Usage considerations
| NvError NvOsFtell | ( | NvOsFileHandle | hFile, |
| NvU64 * | position | ||
| ) |
This function gets the current position of file stream, and it is stored to position parameter as bytes.
| [in] | hFile | File stream to get the current position |
| [out] | position | Current position of file stream as bytes |
Usage considerations
| NvError NvOsFwrite | ( | NvOsFileHandle | hFile, |
| const void * | ptr, | ||
| size_t | size | ||
| ) |
This function writes the buffer to a file stream, and the length or writing is up to size parameter.
| [in] | hFile | File stream to write |
| [in] | ptr | Pointing buffer to write |
| [in] | size | Maximum length of writing |
Usage considerations
| NvError NvOsOpendir | ( | const char * | path, |
| NvOsDirHandle * | dir | ||
| ) |
This function opens a directory.
| [in] | path | Directory path to open |
| [out] | dir | Directory handle |
Usage considerations
| NvError NvOsStat | ( | const char * | filename, |
| NvOsStatType * | filestat | ||
| ) |
This function gets a type of path.
| [in] | filename | path to know the stats |
| [out] | filestat | type of filename parameter, please see note for more detail. |
Usage considerations