Group PJ_FILE_ACCESS
- group PJ_FILE_ACCESS
Functions
-
pj_bool_t pj_file_exists(const char *filename)
Returns non-zero if the specified file exists.
- Parameters
filename – The file name.
- Returns
Non-zero if the file exists.
-
pj_off_t pj_file_size(const char *filename)
Returns the size of the file.
- Parameters
filename – The file name.
- Returns
The file size in bytes or -1 on error.
-
pj_status_t pj_file_delete(const char *filename)
Delete a file.
- Parameters
filename – The filename.
- Returns
PJ_SUCCESS on success or the appropriate error code.
-
pj_status_t pj_file_move(const char *oldname, const char *newname)
Move a
oldname
tonewname
. Ifnewname
already exists, it will be overwritten.- Parameters
oldname – The file to rename.
newname – New filename to assign.
- Returns
PJ_SUCCESS on success or the appropriate error code.
-
pj_status_t pj_file_getstat(const char *filename, pj_file_stat *stat)
Return information about the specified file. The time information in the
stat
structure will be in local time.- Parameters
filename – The filename.
stat – Pointer to variable to receive file information.
- Returns
PJ_SUCCESS on success or the appropriate error code.
-
struct pj_file_stat
- #include <file_access.h>
This structure describes file information, to be obtained by calling pj_file_getstat(). The time information in this structure is in local time.
Public Members
-
pj_time_val atime
Time of last access.
-
pj_time_val mtime
Time of last modification.
-
pj_time_val ctime
Time of last creation.
-
pj_time_val atime
-
pj_bool_t pj_file_exists(const char *filename)