14 #include <kApi/Io/kFile.x.h>
k64u kFile_Length(kFile file)
Returns the current length of the file.
kBool kFile_Exists(const kChar *fileName)
Reports whether the specified file exists.
kStatus kFile_TempName(kChar *name, kSize capacity)
Gets a temporary file name.
kStatus kFile_Copy(const kChar *source, const kChar *destination)
Copies a file to the specified destination.
Represents a 64-bit unsigned integer.
Represents a void pointer.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
k64u kFile_Position(kFile file)
Returns the current position of the read/write pointer, relative to the beginning of the file...
kStatus kFile_Load(const kChar *path, void *data, kSize *size, kAlloc allocator)
Reads the specified file and provides the file contents in an array.
Represents a single unit (byte) in a UTF-8 character.
kStatus kFile_SetWriteBuffer(kFile file, kSize size)
Sets the size of the buffer used for writing.
kStatus kFile_Close(kFile file)
Performs any outstanding I/O operations and closes the underlying file.
kStatus kFile_Delete(const kChar *path)
Deletes the specified file.
Represents a file stream.
kStatus kFile_Construct(kFile *file, const kChar *path, kFileMode mode, kAlloc allocator)
Constructs a kFile object.
kStatus kFile_MoveEx(const kChar *source, const kChar *destination, kCallbackFx progress, kPointer context)
Moves a file to the specified destination with progress feedback.
Core Zen type declarations.
kStatus kFile_Move(const kChar *source, const kChar *destination)
Moves a file to the specified destination.
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1806
Flags that control how a file is opened.
k64u kFile_Size(const kChar *fileName)
Reports the size the specified file, in bytes.
Represents an error code.
kStatus kFile_LoadTo(const kChar *path, void *data, kSize capacity)
Reads the specified file into the provided array.
Represents a boolean value.
kStatus kFile_SetReadBuffer(kFile file, kSize size)
Sets the size of the buffer used for reading.
kStatus kFile_CopyEx(const kChar *source, const kChar *destination, kCallbackFx progress, kPointer context)
Copies a file to the specified destination with progress feedback.
kStatus kFile_Save(const kChar *path, const void *data, kSize size)
Saves the specified data to the specified file.