-
Notifications
You must be signed in to change notification settings - Fork 13
Files IO functions
This category contains types and functions for handling files and directories. More...
| Type | Name |
|---|---|
| struct |
fplFileEntry A structure containing the information for a file or directory (name, type, attributes, etc.). More... |
| struct |
fplFileHandle The file handle structure. More... |
| union |
fplFilePermissions fplFilePermissionMasks operator overloads for C++. More... |
| struct |
fplFileTimeStamps A structure containing timestamps for creation/access/modify date. More... |
| union |
fplInternalFileEntryHandle FileAttributeFlags operator overloads for C++. More... |
| union |
fplInternalFileHandle A union containing the internal file handle for any platform. More... |
| struct |
fplInternalFileRootInfo A structure containing the internal root file information. More... |
| Type | Name |
|---|---|
| typedef uint64_t |
fplFileTimeStamp The elapsed seconds since the UNIX epoch (1970-01-01 00:00:00). |
| Type | Name |
|---|---|
| fpl_platform_api bool |
fplDirectoriesCreate (const char *path) Creates all the directories in the given path. |
| fpl_platform_api bool |
fplDirectoryExists (const char *path) Checks if the given directory exists and returns a boolean indicating its existence. |
| fpl_platform_api bool |
fplDirectoryListBegin (const char *path, const char *filter, fplFileEntry *entry) Iterates through files/directories in the given directory. |
| fpl_platform_api void |
fplDirectoryListEnd (fplFileEntry *entry) Releases opened resources from iterating through files/directories. |
| fpl_platform_api bool |
fplDirectoryListNext (fplFileEntry *entry) Gets the next file entry from iterating through files/directories. |
| fpl_platform_api bool |
fplDirectoryRemove (const char *path) Deletes the given empty directory without confirmation and returns true when the deletion was successful. |
| fpl_platform_api bool |
fplFileAppendBinary (const char *filePath, fplFileHandle *outHandle) Creates or appends a binary file by the given string path and returns the handle of it. |
| fpl_platform_api void |
fplFileClose (fplFileHandle *fileHandle) Closes the given file and releases the underlying resources and clears the handle to zero. |
| fpl_platform_api bool |
fplFileCopy (const char *sourceFilePath, const char *targetFilePath, const bool overwrite) Copies the given source file to the target path and returns true when the copy was successful. |
| fpl_platform_api bool |
fplFileCreateBinary (const char *filePath, fplFileHandle *outHandle) Creates a binary file for writing to the given string path and returns the handle of it. |
| fpl_platform_api bool |
fplFileDelete (const char *filePath) Deletes the given file without confirmation and returns true when the deletion was successful. |
| fpl_platform_api bool |
fplFileExists (const char *filePath) Checks if the file exists and returns a boolean indicating the existence. |
| fpl_platform_api bool |
fplFileFlush (fplFileHandle *fileHandle) Flushes the buffers of the given file and causes all buffered data to be written to a file. |
| fpl_common_api size_t |
fplFileGetPosition (const fplFileHandle *fileHandle) Gets the current file position in bytes. |
| fpl_platform_api uint32_t |
fplFileGetPosition32 (const fplFileHandle *fileHandle) Gets the current file position in bytes. |
| fpl_platform_api uint64_t |
fplFileGetPosition64 (const fplFileHandle *fileHandle) Gets the current file position in bytes. |
| fpl_common_api size_t |
fplFileGetSizeFromHandle (const fplFileHandle *fileHandle) Gets the file size in bytes for an opened file. |
| fpl_platform_api uint32_t |
fplFileGetSizeFromHandle32 (const fplFileHandle *fileHandle) Gets the file size in bytes for an opened file. |
| fpl_platform_api uint64_t |
fplFileGetSizeFromHandle64 (const fplFileHandle *fileHandle) Gets the file size in bytes for an opened file. |
| fpl_platform_api size_t |
fplFileGetSizeFromPath (const char *filePath) Gets the file size in bytes for the given file. |
| fpl_platform_api uint32_t |
fplFileGetSizeFromPath32 (const char *filePath) Gets the file size in bytes for the given file. |
| fpl_platform_api uint64_t |
fplFileGetSizeFromPath64 (const char *filePath) Gets the file size in bytes for the given file. |
| fpl_platform_api bool |
fplFileGetTimestampsFromHandle (const fplFileHandle *fileHandle, fplFileTimeStamps *outStamps) Gets the timestamps for an opened file. |
| fpl_platform_api bool |
fplFileGetTimestampsFromPath (const char *filePath, fplFileTimeStamps *outStamps) Gets the timestamps for the given file. |
| fpl_platform_api bool |
fplFileMove (const char *sourceFilePath, const char *targetFilePath) Moves the given source file to the target file and returns true when the move was successful. |
| fpl_platform_api bool |
fplFileOpenBinary (const char *filePath, fplFileHandle *outHandle) Opens a binary file for reading from a string path and returns the handle of it. |
| fpl_platform_api size_t |
fplFileReadBlock (const fplFileHandle *fileHandle, const size_t sizeToRead, void *targetBuffer, const size_t maxTargetBufferSize) Reads a block from the given file and returns the number of bytes read. |
| fpl_platform_api uint32_t |
fplFileReadBlock32 (const fplFileHandle *fileHandle, const uint32_t sizeToRead, void *targetBuffer, const uint32_t maxTargetBufferSize) Reads a block from the given file and returns the number of bytes read. |
| fpl_platform_api uint64_t |
fplFileReadBlock64 (const fplFileHandle *fileHandle, const uint64_t sizeToRead, void *targetBuffer, const uint64_t maxTargetBufferSize) Reads a block from the given file and returns the number of bytes read. |
| fpl_common_api size_t |
fplFileSetPosition (const fplFileHandle *fileHandle, const intptr_t position, const fplFilePositionMode mode) Sets the current file position by the given position, depending on the mode it's absolute or relative. |
| fpl_platform_api uint32_t |
fplFileSetPosition32 (const fplFileHandle *fileHandle, const int32_t position, const fplFilePositionMode mode) Sets the current file position by the given position, depending on the mode it's absolute or relative. |
| fpl_platform_api uint64_t |
fplFileSetPosition64 (const fplFileHandle *fileHandle, const int64_t position, const fplFilePositionMode mode) Sets the current file position by the given position, depending on the mode it's absolute or relative. |
| fpl_platform_api bool |
fplFileTryGetSizeFromHandle (const fplFileHandle *fileHandle, uint64_t *outSize) Tries to get the full 64-bit file size in bytes for an opened file, distinguishing a zero-byte file from an error. |
| fpl_platform_api bool |
fplFileTryGetSizeFromPath (const char *filePath, uint64_t *outSize) Tries to get the full 64-bit file size in bytes for the given file, distinguishing a zero-byte file from an error. |
| fpl_common_api size_t |
fplFileWriteBlock (const fplFileHandle *fileHandle, const void *sourceBuffer, const size_t sourceSize) Writes a block to the given file and returns the number of written bytes. |
| fpl_platform_api uint32_t |
fplFileWriteBlock32 (const fplFileHandle *fileHandle, const void *sourceBuffer, const uint32_t sourceSize) Writes a block to the given file and returns the number of written bytes. |
| fpl_platform_api uint64_t |
fplFileWriteBlock64 (const fplFileHandle *fileHandle, const void *sourceBuffer, const uint64_t sourceSize) Writes a block to the given file and returns the number of written bytes. |
This category contains types and functions for handling files and directories.
typedef uint64_t fplFileTimeStampThe elapsed seconds since the UNIX epoch (1970-01-01 00:00:00).
Definition at line 8234 of file final_platform_layer.h.
enum fplFileAttributeFlagsAn enumeration of file attribute flags (Normal, Readonly, Hidden, etc.).
Definition at line 8193 of file final_platform_layer.h.
enum fplFileEntryTypeAn enumeration of file entry types (File, Directory, etc.).
| Name | Description |
|---|---|
| fplFileEntryType_Unknown | Unknown entry type. |
| fplFileEntryType_File | Entry is a file. |
| fplFileEntryType_Directory | Entry is a directory. |
Definition at line 8127 of file final_platform_layer.h.
enum fplFilePermissionFlagsAn enumeration of file permission flags.
Definition at line 8140 of file final_platform_layer.h.
enum fplFilePermissionMasksfplFilePermissionFlags operator overloads for C++.
An enumeration of file permission types.
| Name | Description |
|---|---|
| fplFilePermissionMasks_None | No mask. |
| fplFilePermissionMasks_User | User. |
| fplFilePermissionMasks_Group | Group. |
| fplFilePermissionMasks_Owner | Owner. |
Definition at line 8157 of file final_platform_layer.h.
enum fplFilePositionModeAn enumeration of file position modes (Beginning, Current, End).
| Name | Description |
|---|---|
| fplFilePositionMode_Beginning | Starts from the beginning. |
| fplFilePositionMode_Current | Starts from the current position. |
| fplFilePositionMode_End | Starts from the end. |
Definition at line 8114 of file final_platform_layer.h.
fpl_platform_api bool fplDirectoriesCreate ( const char * path)Creates all the directories in the given path.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | path | The path to the directory. |
Returns: Returns true when at least one directory was created, false otherwise.
fpl_platform_api bool fplDirectoryExists ( const char * path)Checks if the given directory exists and returns a boolean indicating its existence.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | path | The path to the directory. |
Returns: Returns true when the directory exists, false otherwise.
fpl_platform_api bool fplDirectoryListBegin ( const char * path, const char * filter, fplFileEntry * entry )Iterates through files/directories in the given directory.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | path | The full path. |
| [in] | filter | The filter wildcard. If empty or null, it is rewritten internally to "*" (match all) and stored as such in the entry's internal root info. |
| [out] | entry | Reference to the file entry structure fplFileEntry. |
Returns: Returns true when there was a first entry found, false otherwise.
Note: This function is not recursive, so it will traverse the first level only!
When no initial entry is found, the resources are automatically cleaned up.
path
and
filter are copied into fixed-size buffers inside
entry ; the caller may free or reuse the source strings immediately after this call returns.
See also: Directory Traversing
fpl_platform_api void fplDirectoryListEnd ( fplFileEntry * entry)Releases opened resources from iterating through files/directories.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in,out] | entry | Reference to the file entry structure fplFileEntry. |
Note: It's safe to call this when the file entry is already closed.
See also: Directory Traversing
fpl_platform_api bool fplDirectoryListNext ( fplFileEntry * entry)Gets the next file entry from iterating through files/directories.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in,out] | entry | Reference to the file entry structure fplFileEntry. |
Returns: Returns true when there was a next file, otherwise false if not.
Note: This function is not recursive, so it will traverse the first level only!
When no entries are found, the resources are automatically cleaned up.
See also: Directory Traversing
fpl_platform_api bool fplDirectoryRemove ( const char * path)Deletes the given empty directory without confirmation and returns true when the deletion was successful.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | path | The path to the directory. |
Returns: Returns true when the empty directory was deleted, false otherwise.
fpl_platform_api bool fplFileAppendBinary ( const char * filePath, fplFileHandle * outHandle )Creates or appends a binary file by the given string path and returns the handle of it.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The file path. |
| [out] | outHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns true when the binary file was created / open for appending, false otherwise.
See also: Creating a Binary File
fpl_platform_api void fplFileClose ( fplFileHandle * fileHandle)Closes the given file and releases the underlying resources and clears the handle to zero.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in,out] | fileHandle | Reference to the file handle structure fplFileHandle. |
See also: Opening a Binary File
fpl_platform_api bool fplFileCopy ( const char * sourceFilePath, const char * targetFilePath, const bool overwrite )Copies the given source file to the target path and returns true when the copy was successful.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | sourceFilePath | The source file path. |
| [in] | targetFilePath | The target file path. |
| [in] | overwrite | The overwrite boolean indicating if the file can be overwritten or not. |
Returns: Returns true when the file was copied, false otherwise.
fpl_platform_api bool fplFileCreateBinary ( const char * filePath, fplFileHandle * outHandle )Creates a binary file for writing to the given string path and returns the handle of it.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The file path. |
| [out] | outHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns true when the binary file was created, false otherwise.
See also: Creating a Binary File
fpl_platform_api bool fplFileDelete ( const char * filePath)Deletes the given file without confirmation and returns true when the deletion was successful.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
Returns: Returns true when the file was deleted, false otherwise.
fpl_platform_api bool fplFileExists ( const char * filePath)Checks if the file exists and returns a boolean indicating the existence.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
Returns: Returns true when the file exists, false otherwise.
fpl_platform_api bool fplFileFlush ( fplFileHandle * fileHandle)Flushes the buffers of the given file and causes all buffered data to be written to a file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in,out] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns true when the file buffer was flushed, false otherwise.
fpl_common_api size_t fplFileGetPosition ( const fplFileHandle * fileHandle)Gets the current file position in bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the current file position in bytes.
Note: Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
See also: Getting the current file position
fpl_platform_api uint32_t fplFileGetPosition32 ( const fplFileHandle * fileHandle)Gets the current file position in bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the current file position in bytes.
Note: Supports max size of 2^31.
See also: Getting the current file position
fpl_platform_api uint64_t fplFileGetPosition64 ( const fplFileHandle * fileHandle)Gets the current file position in bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the current file position in bytes.
Note: Supports max size of 2^63.
See also: Getting the current file position
fpl_common_api size_t fplFileGetSizeFromHandle ( const fplFileHandle * fileHandle)Gets the file size in bytes for an opened file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the file size in bytes or zero.
Note: Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
fpl_platform_api uint32_t fplFileGetSizeFromHandle32 ( const fplFileHandle * fileHandle)Gets the file size in bytes for an opened file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the file size in bytes or zero.
Note: Supports max size of 2^31.
fpl_platform_api uint64_t fplFileGetSizeFromHandle64 ( const fplFileHandle * fileHandle)Gets the file size in bytes for an opened file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns the file size in bytes or zero.
Note: Supports max size of 2^63.
fpl_platform_api size_t fplFileGetSizeFromPath ( const char * filePath)Gets the file size in bytes for the given file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
Returns: Returns the file size in bytes or zero.
Note: Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
fpl_platform_api uint32_t fplFileGetSizeFromPath32 ( const char * filePath)Gets the file size in bytes for the given file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
Returns: Returns the file size in bytes or zero.
Note: Supports max size of 2^31.
fpl_platform_api uint64_t fplFileGetSizeFromPath64 ( const char * filePath)Gets the file size in bytes for the given file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
Returns: Returns the file size in bytes or zero.
Note: Supports max size of 2^63.
fpl_platform_api bool fplFileGetTimestampsFromHandle ( const fplFileHandle * fileHandle, fplFileTimeStamps * outStamps )Gets the timestamps for an opened file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [out] | outStamps | Reference to the file timestamps structure fplFileTimeStamps. |
Returns: Returns true when the function succeeded, false otherwise.
fpl_platform_api bool fplFileGetTimestampsFromPath ( const char * filePath, fplFileTimeStamps * outStamps )Gets the timestamps for the given file.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
| [out] | outStamps | Reference to the file timestamps structure fplFileTimeStamps. |
Returns: Returns true when the function succeeded, false otherwise.
fpl_platform_api bool fplFileMove ( const char * sourceFilePath, const char * targetFilePath )Moves the given source file to the target file and returns true when the move was successful.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | sourceFilePath | The source file path. |
| [in] | targetFilePath | The target file path. |
Returns: Returns true when the file was moved, false otherwise.
fpl_platform_api bool fplFileOpenBinary ( const char * filePath, fplFileHandle * outHandle )Opens a binary file for reading from a string path and returns the handle of it.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The file path. |
| [out] | outHandle | Reference to the file handle structure fplFileHandle. |
Returns: Returns true when the binary file was opened, false otherwise.
See also: Opening a Binary File
fpl_platform_api size_t fplFileReadBlock ( const fplFileHandle * fileHandle, const size_t sizeToRead, void * targetBuffer, const size_t maxTargetBufferSize )Reads a block from the given file and returns the number of bytes read.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sizeToRead | The number of bytes to read. |
| [out] | targetBuffer | The target memory to write into. |
| [in] | maxTargetBufferSize | Total number of bytes available in the target buffer. |
Returns: Returns the number of bytes read, or 0 on EOF or hard error.
Note: A return of 0 is ambiguous: it may mean end-of-file or a read failure (NULL handle, invalid handle, OS-level read error). Disambiguate via the matching
fplFileGetSizeFromHandle variant, or check
Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
See also: Reading from the file
fpl_platform_api uint32_t fplFileReadBlock32 ( const fplFileHandle * fileHandle, const uint32_t sizeToRead, void * targetBuffer, const uint32_t maxTargetBufferSize )Reads a block from the given file and returns the number of bytes read.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sizeToRead | The number of bytes to read. |
| [out] | targetBuffer | The target memory to write into. |
| [in] | maxTargetBufferSize | Total number of bytes available in the target buffer. |
Returns: Returns the number of bytes read, or 0 on EOF or hard error.
Note: A return of 0 is ambiguous: it may mean end-of-file or a read failure (NULL handle, invalid handle, OS-level read error). Disambiguate via
fplFileGetSizeFromHandle32 , or check
Supports max size of 2^31.
See also: Reading from the file
fpl_platform_api uint64_t fplFileReadBlock64 ( const fplFileHandle * fileHandle, const uint64_t sizeToRead, void * targetBuffer, const uint64_t maxTargetBufferSize )Reads a block from the given file and returns the number of bytes read.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sizeToRead | The number of bytes to read. |
| [out] | targetBuffer | The target memory to write into. |
| [in] | maxTargetBufferSize | Total number of bytes available in the target buffer. |
Returns: Returns the number of bytes read, or 0 on EOF or hard error.
Note: A return of 0 is ambiguous: it may mean end-of-file or a read failure (NULL handle, invalid handle, OS-level read error). Disambiguate via
fplFileGetSizeFromHandle64 , or check
Supports max size of 2^63.
See also: Reading from the file
fpl_common_api size_t fplFileSetPosition ( const fplFileHandle * fileHandle, const intptr_t position, const fplFilePositionMode mode )Sets the current file position by the given position, depending on the mode it's absolute or relative.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | position | Position in bytes. |
| [in] | mode | Position mode. |
Note: Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
fpl_platform_api uint32_t fplFileSetPosition32 ( const fplFileHandle * fileHandle, const int32_t position, const fplFilePositionMode mode )Sets the current file position by the given position, depending on the mode it's absolute or relative.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | position | Position in bytes. |
| [in] | mode | Position mode. |
Note: Supports max size of 2^31.
fpl_platform_api uint64_t fplFileSetPosition64 ( const fplFileHandle * fileHandle, const int64_t position, const fplFilePositionMode mode )Sets the current file position by the given position, depending on the mode it's absolute or relative.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | position | Position in bytes. |
| [in] | mode | Position mode. |
Note: Supports max size of 2^63.
fpl_platform_api bool fplFileTryGetSizeFromHandle ( const fplFileHandle * fileHandle, uint64_t * outSize )Tries to get the full 64-bit file size in bytes for an opened file, distinguishing a zero-byte file from an error.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [out] | outSize | Reference that receives the file size in bytes on success. Untouched on failure. |
Returns: Returns true when the size was retrieved, false on any error (NULL input, invalid handle, query failed).
fpl_platform_api bool fplFileTryGetSizeFromPath ( const char * filePath, uint64_t * outSize )Tries to get the full 64-bit file size in bytes for the given file, distinguishing a zero-byte file from an error.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | filePath | The path to the file. |
| [out] | outSize | Reference that receives the file size in bytes on success. Untouched on failure. |
Returns: Returns true when the size was retrieved, false on any error (NULL input, file not accessible, query failed).
fpl_common_api size_t fplFileWriteBlock ( const fplFileHandle * fileHandle, const void * sourceBuffer, const size_t sourceSize )Writes a block to the given file and returns the number of written bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sourceBuffer | Source memory to read from. |
| [in] | sourceSize | Number of bytes to write. |
Returns: Returns the number of bytes written or zero.
Note: Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes.
See also: Writing to the file
fpl_platform_api uint32_t fplFileWriteBlock32 ( const fplFileHandle * fileHandle, const void * sourceBuffer, const uint32_t sourceSize )Writes a block to the given file and returns the number of written bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sourceBuffer | Source memory to read from. |
| [in] | sourceSize | Number of bytes to write. |
Returns: Returns the number of bytes written or zero.
Note: Supports max size of 2^31.
See also: Writing to the file
fpl_platform_api uint64_t fplFileWriteBlock64 ( const fplFileHandle * fileHandle, const void * sourceBuffer, const uint64_t sourceSize )Writes a block to the given file and returns the number of written bytes.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | fileHandle | Reference to the file handle structure fplFileHandle. |
| [in] | sourceBuffer | Source memory to read from. |
| [in] | sourceSize | Number of bytes to write. |
Returns: Returns the number of bytes written or zero.
Note: Supports max size of 2^63.
See also: Writing to the file
- Assertion & Debug
- Atomic operations
- Audio functions
- Clipboard functions
- Console functions
- Constants
- Display/Monitor functions
- Dynamic library loading
- Error Handling
- Files/IO functions
- Function macros
- Hardware Infos
- Input types and functions
- Localization functions
- Logging
- Memory Macros
- Memory functions
- Operating system Infos
- Path functions
- Platform functions
- Session Infos
- Settings & Configurations
- Storage class identifiers
- String functions
- Threading and synchronizations routines
- Timing functions
- Video functions
- Window events
- Window functions
- fplARMCPUCapabilities
- fplAudioChannelMap
- fplAudioDeviceID
- fplAudioDeviceInfo
- fplAudioFormat
- fplAudioSettings
- fplColor32
- fplConditionVariable
- fplConsoleSettings
- fplCPUCapabilities
- fplCPUIDLeaf
- fplDateTime
- fplDateTimeCreationResult
- fplDateTimeResult
- fplDisplayInfo
- fplDisplayMode
- fplDynamicLibraryHandle
- fplEndianess
- fplEvent
- fplFileEntry
- fplFileHandle
- fplFilePermissions
- fplFileTimeStamps
- fplGamepadButton
- fplGamepadData
- fplGamepadEvent
- fplGamepadInfo
- fplGamepadInputBinding
- fplGamepadMapping
- fplGamepadSettings
- fplGamepadState
- fplGamepadStates
- fplGraphicsApiSettings
- fplImageSource
- fplInputBackendMask
- fplInputBackendSupport
- fplInputDevice
- fplInputDeviceGuid
- fplInputSettings
- fplInternalConditionVariable
- fplInternalDynamicLibraryHandle
- fplInternalFileEntryHandle
- fplInternalFileHandle
- fplInternalFileRootInfo
- fplInternalMutexHandle
- fplInternalSemaphoreHandle
- fplInternalSignalHandle
- fplInternalThreadHandle
- fplKeyboardEvent
- fplKeyboardState
- fplLogSettings
- fplLogWriter
- fplLogWriterConsole
- fplLogWriterCustom
- fplMemoryAllocationSettings
- fplMemoryBlock
- fplMemoryInfos
- fplMemorySettings
- fplMouseEvent
- fplMouseState
- fplMutexHandle
- fplOpenGLSettings
- fplOSVersionInfos
- fplSemaphoreHandle
- fplSettings
- fplSignalHandle
- fplSpecificAudioSettings
- fplThreadHandle
- fplThreadParameters
- fplTimestamp
- fplVersionInfo
- fplVideoBackBuffer
- fplVideoRect
- fplVideoRequirements
- fplVideoRequirementsVulkan
- fplVideoSettings
- fplVideoSurface
- fplVideoSurfaceOpenGL
- fplVideoSurfaceVulkan
- fplVideoWindow
- fplVulkanSettings
- fplWindowCallbacks
- fplWindowDropFiles
- fplWindowEvent
- fplWindowPosition
- fplWindowSettings
- fplWindowSize
- fplX86CPUCapabilities