Final Platform Layer 0.9.8-beta
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
Files/IO functions

This category contains and types and functions for handling files & directories. More...

Data Structures

struct  fplFileEntry
 A structure containing the informations for a file or directory (name, type, attributes, etc.) More...
 
struct  fplFileHandle
 The filehandle structure. More...
 
union  fplFilePermissions
 A union containing the file permissions (UMask) More...
 
struct  fplFileTimeStamps
 A structure containing filestamps for creation/access/modify date. More...
 
union  fplInternalFileEntryHandle
 A union containing the internal filehandle for any platform. More...
 
union  fplInternalFileHandle
 A union containing the internal filehandle for any platform. More...
 
struct  fplInternalFileRootInfo
 A structure containing the internal root file informations. More...
 

Typedefs

typedef enum fplFileAttributeFlags fplFileAttributeFlags
 An enumeratation of file attribute flags (Normal, Readonly, Hidden, etc.)
 
typedef struct fplFileEntry fplFileEntry
 A structure containing the informations for a file or directory (name, type, attributes, etc.)
 
typedef enum fplFileEntryType fplFileEntryType
 An enumeration of file entry types (File, Directory, etc.)
 
typedef struct fplFileHandle fplFileHandle
 The filehandle structure.
 
typedef enum fplFilePermissionFlags fplFilePermissionFlags
 An enumeration of file permission flags.
 
typedef enum fplFilePermissionMasks fplFilePermissionMasks
 An enumeration of file permission types.
 
typedef union fplFilePermissions fplFilePermissions
 A union containing the file permissions (UMask)
 
typedef enum fplFilePositionMode fplFilePositionMode
 An enumeration of file position modes (Beginning, Current, End)
 
typedef uint64_t fplFileTimeStamp
 The elapsed seconds since the UNIX epoch (1970-01-01 00:00:00)
 
typedef struct fplFileTimeStamps fplFileTimeStamps
 A structure containing filestamps for creation/access/modify date.
 
typedef union fplInternalFileEntryHandle fplInternalFileEntryHandle
 A union containing the internal filehandle for any platform.
 
typedef union fplInternalFileHandle fplInternalFileHandle
 A union containing the internal filehandle for any platform.
 
typedef struct fplInternalFileRootInfo fplInternalFileRootInfo
 A structure containing the internal root file informations.
 

Enumerations

enum  fplFileAttributeFlags {
  fplFileAttributeFlags_None , fplFileAttributeFlags_Normal , fplFileAttributeFlags_Hidden , fplFileAttributeFlags_System ,
  fplFileAttributeFlags_Archive
}
 An enumeratation of file attribute flags (Normal, Readonly, Hidden, etc.) More...
 
enum  fplFileEntryType { fplFileEntryType_Unknown , fplFileEntryType_File , fplFileEntryType_Directory }
 An enumeration of file entry types (File, Directory, etc.) More...
 
enum  fplFilePermissionFlags { fplFilePermissionFlags_All , fplFilePermissionFlags_CanExecuteSearch , fplFilePermissionFlags_CanWrite , fplFilePermissionFlags_CanRead }
 An enumeration of file permission flags. More...
 
enum  fplFilePermissionMasks { fplFilePermissionMasks_None , fplFilePermissionMasks_User , fplFilePermissionMasks_Group , fplFilePermissionMasks_Owner }
 An enumeration of file permission types. More...
 
enum  fplFilePositionMode { fplFilePositionMode_Beginning , fplFilePositionMode_Current , fplFilePositionMode_End }
 An enumeration of file position modes (Beginning, Current, End) More...
 

Functions

 FPL_ENUM_AS_FLAGS_OPERATORS (fplFileAttributeFlags)
 FileAttributeFlags operator overloads for C++.
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplFilePermissionFlags)
 fplFilePermissionFlags operator overloads for C++
 
 FPL_ENUM_AS_FLAGS_OPERATORS (fplFilePermissionMasks)
 fplFilePermissionMasks operator overloads for C++
 
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 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)
 Create 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)
 Movies 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 fplFileSetTimestamps (const char *filePath, const fplFileTimeStamps *timeStamps)
 Sets the timestamps for the given file.
 
fpl_common_api size_t fplFileWriteBlock (const fplFileHandle *fileHandle, 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, 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, void *sourceBuffer, const uint64_t sourceSize)
 Writes a block to the given file and returns the number of written bytes.
 

Detailed Description

This category contains and types and functions for handling files & directories.

Typedef Documentation

◆ fplFileTimeStamp

typedef uint64_t fplFileTimeStamp

The elapsed seconds since the UNIX epoch (1970-01-01 00:00:00)

Definition at line 5295 of file final_platform_layer.h.

Enumeration Type Documentation

◆ fplFileAttributeFlags

An enumeratation of file attribute flags (Normal, Readonly, Hidden, etc.)

Enumerator
fplFileAttributeFlags_None 

No attributes.

fplFileAttributeFlags_Normal 

Normal.

fplFileAttributeFlags_Hidden 

Hidden.

fplFileAttributeFlags_System 

System.

fplFileAttributeFlags_Archive 

Archive.

Definition at line 5260 of file final_platform_layer.h.

◆ fplFileEntryType

An enumeration of file entry types (File, Directory, etc.)

Enumerator
fplFileEntryType_Unknown 

Unknown entry type.

fplFileEntryType_File 

Entry is a file.

fplFileEntryType_Directory 

Entry is a directory.

Definition at line 5206 of file final_platform_layer.h.

◆ fplFilePermissionFlags

An enumeration of file permission flags.

Enumerator
fplFilePermissionFlags_All 

All (Read, Write, Execute, Search)

fplFilePermissionFlags_CanExecuteSearch 

CanExecute.

fplFilePermissionFlags_CanWrite 

CanWrite.

fplFilePermissionFlags_CanRead 

CanRead.

Definition at line 5216 of file final_platform_layer.h.

◆ fplFilePermissionMasks

An enumeration of file permission types.

Enumerator
fplFilePermissionMasks_None 

No mask.

fplFilePermissionMasks_User 

User.

fplFilePermissionMasks_Group 

Group.

fplFilePermissionMasks_Owner 

Owner.

Definition at line 5230 of file final_platform_layer.h.

◆ fplFilePositionMode

An enumeration of file position modes (Beginning, Current, End)

Enumerator
fplFilePositionMode_Beginning 

Starts from the beginning.

fplFilePositionMode_Current 

Starts from the current position.

fplFilePositionMode_End 

Starts from the end.

Definition at line 5196 of file final_platform_layer.h.

Function Documentation

◆ fplDirectoriesCreate()

fpl_platform_api bool fplDirectoriesCreate ( const char *  path)

Creates all the directories in the given path.

Parameters
pathThe path to the directory
Returns
Returns true when at least one directory was created, false otherwise.

◆ fplDirectoryExists()

fpl_platform_api bool fplDirectoryExists ( const char *  path)

Checks if the given directory exists and returns a boolean indicating its existence.

Parameters
pathThe path to the directory
Returns
Returns true when the directory exists, false otherwise.

◆ fplDirectoryListBegin()

fpl_platform_api bool fplDirectoryListBegin ( const char *  path,
const char *  filter,
fplFileEntry entry 
)

Iterates through files/directories in the given directory.

Parameters
pathThe full path
filterThe filter wildcard (If empty or null it will not filter anything at all)
entryThe pointer to the fplFileEntry structure
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.
See also
Directory Traversing

◆ fplDirectoryListEnd()

fpl_platform_api void fplDirectoryListEnd ( fplFileEntry entry)

Releases opened resources from iterating through files/directories.

Parameters
entryThe pointer to the fplFileEntry structure
Note
It's safe to call this when the file entry is already closed.
See also
Directory Traversing

◆ fplDirectoryListNext()

fpl_platform_api bool fplDirectoryListNext ( fplFileEntry entry)

Gets the next file entry from iterating through files/directories.

Parameters
entryThe pointer to the fplFileEntry structure
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

◆ fplDirectoryRemove()

fpl_platform_api bool fplDirectoryRemove ( const char *  path)

Deletes the given empty directory without confirmation and returns true when the deletion was successful.

Parameters
pathThe path to the directory.
Returns
Returns true when the empty directory was deleted, false otherwise.

◆ fplFileClose()

fpl_platform_api void fplFileClose ( fplFileHandle fileHandle)

Closes the given file and releases the underlying resources and clears the handle to zero.

Parameters
fileHandleThe pointer to the fplFileHandle structure
See also
Opening a Binary File

◆ fplFileCopy()

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
sourceFilePathThe source file path
targetFilePathThe target file path
overwriteThe overwrite boolean indicating if the file can be overwritten or not
Returns
Returns true when the file was copied, false otherwise.

◆ fplFileCreateBinary()

fpl_platform_api bool fplFileCreateBinary ( const char *  filePath,
fplFileHandle outHandle 
)

Create a binary file for writing to the given string path and returns the handle of it.

Parameters
filePathThe file path
outHandleThe pointer to the fplFileHandle structure
Returns
Returns true when the binary file was created, false otherwise.
See also
Creating a Binary File

◆ fplFileDelete()

fpl_platform_api bool fplFileDelete ( const char *  filePath)

Deletes the given file without confirmation and returns true when the deletion was successful.

Parameters
filePathThe path to the file
Returns
Returns true when the file was deleted, false otherwise.

◆ fplFileExists()

fpl_platform_api bool fplFileExists ( const char *  filePath)

Checks if the file exists and returns a boolean indicating the existence.

Parameters
filePathThe path to the file
Returns
Returns true when the file exists, false otherwise.

◆ fplFileFlush()

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
fileHandleThe pointer to the fplFileHandle structure
Returns
Returns true when file buffer was flushed, false otherwise.

◆ fplFileGetPosition()

fpl_common_api size_t fplFileGetPosition ( const fplFileHandle fileHandle)

Gets the current file position in bytes.

Parameters
fileHandleThe pointer to the fplFileHandle structure
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

◆ fplFileGetPosition32()

fpl_platform_api uint32_t fplFileGetPosition32 ( const fplFileHandle fileHandle)

Gets the current file position in bytes.

Parameters
fileHandleThe pointer to the fplFileHandle structure
Returns
Returns the current file position in bytes.
Note
Supports max size of 2^31
See also
Getting the current file position

◆ fplFileGetPosition64()

fpl_platform_api uint64_t fplFileGetPosition64 ( const fplFileHandle fileHandle)

Gets the current file position in bytes.

Parameters
fileHandleThe pointer to the fplFileHandle structure
Returns
Returns the current file position in bytes.
Note
Supports max size of 2^63
See also
Getting the current file position

◆ fplFileGetSizeFromHandle()

fpl_common_api size_t fplFileGetSizeFromHandle ( const fplFileHandle fileHandle)

Gets the file size in bytes for an opened file.

Parameters
fileHandleThe pointer to the fplFileHandle structure
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

◆ fplFileGetSizeFromHandle32()

fpl_platform_api uint32_t fplFileGetSizeFromHandle32 ( const fplFileHandle fileHandle)

Gets the file size in bytes for an opened file.

Parameters
fileHandleThe pointer to the fplFileHandle structure
Returns
Returns the file size in bytes or zero.
Note
Supports max size of 2^31

◆ fplFileGetSizeFromHandle64()

fpl_platform_api uint64_t fplFileGetSizeFromHandle64 ( const fplFileHandle fileHandle)

Gets the file size in bytes for an opened file.

Parameters
fileHandleThe pointer to the fplFileHandle structure
Returns
Returns the file size in bytes or zero.
Note
Supports max size of 2^63

◆ fplFileGetSizeFromPath()

fpl_platform_api size_t fplFileGetSizeFromPath ( const char *  filePath)

Gets the file size in bytes for the given file.

Parameters
filePathThe 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

◆ fplFileGetSizeFromPath32()

fpl_platform_api uint32_t fplFileGetSizeFromPath32 ( const char *  filePath)

Gets the file size in bytes for the given file.

Parameters
filePathThe path to the file
Returns
Returns the file size in bytes or zero.
Note
Supports max size of 2^31

◆ fplFileGetSizeFromPath64()

fpl_platform_api uint64_t fplFileGetSizeFromPath64 ( const char *  filePath)

Gets the file size in bytes for the given file.

Parameters
filePathThe path to the file
Returns
Returns the file size in bytes or zero.
Note
Supports max size of 2^63

◆ fplFileGetTimestampsFromHandle()

fpl_platform_api bool fplFileGetTimestampsFromHandle ( const fplFileHandle fileHandle,
fplFileTimeStamps outStamps 
)

Gets the timestamps for an opened file.

Parameters
fileHandleThe pointer to the fplFileHandle structure
outStampsThe pointer to the fplFileTimeStamps structure
Returns
Returns true when the function succeeded, false otherwise.

◆ fplFileGetTimestampsFromPath()

fpl_platform_api bool fplFileGetTimestampsFromPath ( const char *  filePath,
fplFileTimeStamps outStamps 
)

Gets the timestamps for the given file.

Parameters
filePathThe path to the file
outStampsThe pointer to the fplFileTimeStamps structure
Returns
Returns true when the function succeeded, false otherwise.

◆ fplFileMove()

fpl_platform_api bool fplFileMove ( const char *  sourceFilePath,
const char *  targetFilePath 
)

Movies the given source file to the target file and returns true when the move was successful.

Parameters
sourceFilePathThe source file path
targetFilePathThe target file path
Returns
Returns true when the file was moved, false otherwise.

◆ fplFileOpenBinary()

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
filePathThe file path
outHandleThe pointer to the fplFileHandle structure
Returns
Returns true when the binary file was opened, false otherwise.
See also
Opening a Binary File

◆ fplFileReadBlock()

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
fileHandleThe pointer to the fplFileHandle structure
sizeToReadThe number of bytes to read
targetBufferThe target memory to write into
maxTargetBufferSizeTotal number of bytes available in the target buffer
Returns
Returns the number of bytes read or zero.
Note
Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes
See also
Reading from the file

◆ fplFileReadBlock32()

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
fileHandleThe pointer to the fplFileHandle structure
sizeToReadThe number of bytes to read
targetBufferThe target memory to write into
maxTargetBufferSizeTotal number of bytes available in the target buffer
Returns
Returns the number of bytes read or zero.
Note
Supports max size of 2^31
See also
Reading from the file

◆ fplFileReadBlock64()

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
fileHandleThe pointer to the fplFileHandle structure
sizeToReadThe number of bytes to read
targetBufferThe target memory to write into
maxTargetBufferSizeTotal number of bytes available in the target buffer
Returns
Returns the number of bytes read or zero.
Note
Supports max size of 2^63
See also
Reading from the file

◆ fplFileSetPosition()

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
fileHandleThe pointer to the fplFileHandle structure
positionPosition in bytes
modePosition mode
Note
Depending on the platform/architecture, this supports a max size of 2^31 or 2^63 bytes
See also
Setting the current file position (Seeking)

◆ fplFileSetPosition32()

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
fileHandleThe pointer to the fplFileHandle structure
positionPosition in bytes
modePosition mode
Note
Supports max size of 2^31
See also
Setting the current file position (Seeking)

◆ fplFileSetPosition64()

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
fileHandleThe pointer to the fplFileHandle structure
positionPosition in bytes
modePosition mode
Note
Supports max size of 2^63
See also
Setting the current file position (Seeking)

◆ fplFileSetTimestamps()

fpl_platform_api bool fplFileSetTimestamps ( const char *  filePath,
const fplFileTimeStamps timeStamps 
)

Sets the timestamps for the given file.

Parameters
filePathThe path to the file
timeStampsThe pointer to the fplFileTimeStamps structure
Returns
Returns true when the function succeeded, false otherwise.

◆ fplFileWriteBlock()

fpl_common_api size_t fplFileWriteBlock ( const fplFileHandle fileHandle,
void *  sourceBuffer,
const size_t  sourceSize 
)

Writes a block to the given file and returns the number of written bytes.

Parameters
fileHandleThe pointer to the filehandle fplFileHandle
sourceBufferSource memory to read from
sourceSizeNumber 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

◆ fplFileWriteBlock32()

fpl_platform_api uint32_t fplFileWriteBlock32 ( const fplFileHandle fileHandle,
void *  sourceBuffer,
const uint32_t  sourceSize 
)

Writes a block to the given file and returns the number of written bytes.

Parameters
fileHandleThe pointer to the filehandle fplFileHandle
sourceBufferSource memory to read from
sourceSizeNumber 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

◆ fplFileWriteBlock64()

fpl_platform_api uint64_t fplFileWriteBlock64 ( const fplFileHandle fileHandle,
void *  sourceBuffer,
const uint64_t  sourceSize 
)

Writes a block to the given file and returns the number of written bytes.

Parameters
fileHandleThe pointer to the filehandle fplFileHandle
sourceBufferSource memory to read from
sourceSizeNumber 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