#include <cafe/fs.h>

FSError FSGetLastError(FSClient *client);


client Pointer to the client.

Return Values

FS_ERROR_OK Successfully completed.
FS_ERROR_NOT_INIT FS service is not initialized.
FS_ERROR_CANCELED Command canceled.
FS_ERROR_END_OF_DIRECTORY Indicates the end of a directory.
FS_ERROR_END_OF_FILE Indicates the end of a file.
FS_ERROR_MAX_MOUNTPOINTS Reached the max number of mount points.
FS_ERROR_MAX_VOLUMES Reached the max number of volumes.
FS_ERROR_MAX_CLIENTS Reached the max number of clients.
FS_ERROR_MAX_FILES Reached the max number of file handles.
FS_ERROR_MAX_DIRS Reached the max number of directory handles.
FS_ERROR_ALREADY_OPEN Target is already opened or locked by another transaction.
FS_ERROR_ALREADY_EXISTS Target path already exists.
FS_ERROR_NOT_FOUND Target path is not found.
FS_ERROR_NOT_EMPTY Target path is not empty.
FS_ERROR_ACCESS_ERROR Attempted to access a file with bad file mode.
FS_ERROR_PERMISSION_ERROR Did not have permission to complete the operation.
FS_ERROR_DATA_CORRUPTED Cannot complete the transaction due to a corrupted data block.
FS_ERROR_STORAGE_FULL Request would cause one of the parent directories to exceed its quota, or no free space is left in storage.
FS_ERROR_JOURNAL_FULL Transaction journal is full and needs to be flushed.
FS_ERROR_UNAVAILABLE_CMD Operation is not available now.
FS_ERROR_UNSUPPORTED_CMD Operation is not supported by file system.
FS_ERROR_INVALID_PARAM Specified parameter is invalid.
FS_ERROR_INVALID_PATH Specified path is invalid.
FS_ERROR_INVALID_BUFFER Specified buffer is invalid.
FS_ERROR_INVALID_ALIGNMENT Specified alignment is invalid.
FS_ERROR_INVALID_CLIENT_HANDLE Specified client handle is invalid.
FS_ERROR_INVALID_FILE_HANDLE Specified file handle is invalid.
FS_ERROR_INVALID_DIR_HANDLE Specified directory handle is invalid.
FS_ERROR_NOT_FILE Specified path is a directory instead of a file.
FS_ERROR_NOT_DIR Specified path is not a directory.
FS_ERROR_FILE_TOO_BIG Request would push the file over the size limit (not the quota limit).
FS_ERROR_OUT_OF_RANGE Attempted to access out of accessible area.
FS_ERROR_OUT_OF_RESOURCES Internal resources ran short.
FS_ERROR_MEDIA_NOT_READY Medium is not ready to use, user has to put medium correctly.
FS_ERROR_MEDIA_ERROR Medium is in some bad condition.
FS_ERROR_WRITE_PROTECTED Medium is protected from write accessing.


Returns the latest detailed error code. For information on error value definitions, see FSError.

This function is for development only. Do not use the result of this function to change application behavior.

Do Not Call From

Production code Do not call this function in production code. It is available only for debugging purposes.

See Also


Revision History

2013/05/08 Automated cleanup pass.
2012/07/20 Readability cleanup.
2011/12/16 Initial version.