module File Handling

This is the documentation for Enlighten.

module File Handling

Classes

Name

Description

Name

Description

Geo::GeoFileManager

The file manager deals with locating resources given a path and a filename.

Enums

Name

Description

Name

Description

GeoFSeekOrigin

To avoid pulling in the entire stdio header, use our own values for GeoFSeek.

Typedefs

Name

Description

Name

Description

void(* FileOpenCallback)(const char *path, const char *mode)

path: path to the file being opened.

__int64 offset_t

A offset type, similar to size_t (off_t is not supported on all used platforms)

Functions

Name

Description

Name

Description

FileExists(const char *)

Checks that testFile exists.

FileExistsAndIsNewer(const char *, const char *)

Checks that testFile exists and is newer than exemplarFile.

FileIsWritable(const char *)

Checks that the file named filename can be written to.

FreeLoadedFile(void *)

Free a previously loaded file.

GeoConstructAPIFilename(const char *, char *)

Construct a filename for use in the underlying platform filesystem API.

GeoDeleteFile(const char *)

Delete a file.

GeoDirectoryCreate(const char *)

Creates a directory and all the directories leading up to it.

GeoFClose(FILE *)

A safe alternative to fclose.

GeoFEof(FILE *)

A safe alternative to feof.

GeoFError(FILE *)

A safe alternative to ferror. Returns a non-zero value to indicate an error.

GeoFOpen(const char *, const char *)

GeoFOpen.

GeoFRead(void *, size_t, size_t, FILE *)

A safe alternative to fread.

GeoFSeek(offset_t, GeoFSeekOrigin, FILE *)

A safe alternative to fseek.

GeoFTell(FILE *)

A safe alternative to ftell.

GeoFWrite(const void *, size_t, size_t, FILE *)

A safe alternative to fwrite.

GeoRenameFile(const char *, const char *)

Rename a file.

GetFileSystemPrefix()

Get the previously set file system prefix for the current platform.

InvokeFileOpenCallback(const char *, const char *)

Invoke the file open callback, if set.

LoadFile(const char *, u32 &, u32, u32)

A safe alternative to ferror.

LoadFileStr(const char *, u32 &, u32)

Load a file and append a null terminator.

SaveFile(const char *, const void *, u32)

Save a file.

SetFileOpenCallback(FileOpenCallback)

Set the function to be called when a file is opened, or a null pointer to disable the callback.

SetFileSystemPrefix(const char *)

Set a file system prefix for the current platform.