BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

Data Structures

struct  pj_file_stat
 

Functions

pj_bool_t pj_file_exists (const char *filename)
 
pj_off_t pj_file_size (const char *filename)
 
pj_status_t pj_file_delete (const char *filename)
 
pj_status_t pj_file_move (const char *oldname, const char *newname)
 
pj_status_t pj_file_getstat (const char *filename, pj_file_stat *stat)
 

Detailed Description

Function Documentation

◆ pj_file_delete()

pj_status_t pj_file_delete ( const char *  filename)

Delete a file.

Parameters
filenameThe filename.
Returns
PJ_SUCCESS on success or the appropriate error code.

◆ pj_file_exists()

pj_bool_t pj_file_exists ( const char *  filename)

Returns non-zero if the specified file exists.

Parameters
filenameThe file name.
Returns
Non-zero if the file exists.

◆ pj_file_getstat()

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
filenameThe filename.
statPointer to variable to receive file information.
Returns
PJ_SUCCESS on success or the appropriate error code.

◆ pj_file_move()

pj_status_t pj_file_move ( const char *  oldname,
const char *  newname 
)

Move a oldname to newname. If newname already exists, it will be overwritten.

Parameters
oldnameThe file to rename.
newnameNew filename to assign.
Returns
PJ_SUCCESS on success or the appropriate error code.

◆ pj_file_size()

pj_off_t pj_file_size ( const char *  filename)

Returns the size of the file.

Parameters
filenameThe file name.
Returns
The file size in bytes or -1 on error.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.