#include <sys/types.h>
#include <time.h>
#include <libcomprex/archive.h>
#include <libcomprex/directory.h>
#include <libcomprex/types.h>
Go to the source code of this file.
Data Structures | |
struct | _CxFile |
A representation of a file on the filesystem or in an archive. More... | |
Structure (De)allocation Functions | |
CxFile * | cxNewFile (void) |
Creates a new CxFile structure. | |
void | cxDestroyFile (CxFile *file) |
Destroys a CxFile structure. | |
Attribute Modification Functions | |
void | cxSetFileArchive (CxFile *file, CxArchive *archive) |
Sets the archive that owns the file. | |
void | cxSetFileParent (CxFile *file, CxDirectory *parent) |
Sets the specified file's parent directory. | |
void | cxSetFileName (CxFile *file, const char *name) |
Sets the base name of the specified file. | |
void | cxSetFilePath (CxFile *file, const char *path) |
Sets the full path to the file. | |
void | cxSetFilePhysicalPath (CxFile *file, const char *path) |
Sets the full physical path to the file. | |
void | cxSetFileType (CxFile *file, CxFileType type) |
Sets the type of file. | |
void | cxSetFileMode (CxFile *file, mode_t mode) |
Sets the mode of the specified file. | |
void | cxSetFileUid (CxFile *file, uid_t uid) |
Sets the user ID of the specified file. | |
void | cxSetFileGid (CxFile *file, gid_t gid) |
Sets the group ID of the specified file. | |
void | cxSetFileCompressedSize (CxFile *file, unsigned int size) |
Sets the compressed size of the specified file. | |
void | cxSetFileSize (CxFile *file, unsigned int size) |
Sets the uncompressed size of the specified file. | |
void | cxSetFileDate (CxFile *file, time_t date) |
Sets the timestamp of the specified file. | |
void | cxSetFileLocal (CxFile *file, char isLocalFile) |
Sets whether or not the file is stored locally. | |
Attribute Retrieval Functions | |
CxArchive * | cxGetFileArchive (CxFile *file) |
Returns the archive that owns the specified file. | |
CxDirectory * | cxGetFileParent (CxFile *file) |
Returns the specified file's parent directory. | |
const char * | cxGetFileName (CxFile *file) |
Returns the name of the specified file. | |
const char * | cxGetFilePath (CxFile *file) |
Returns the full path to the specified file. | |
const char * | cxGetFilePhysicalPath (CxFile *file) |
Returns the full physical path to the file. | |
CxFileType | cxGetFileType (CxFile *file) |
Gets the type of file. | |
mode_t | cxGetFileMode (CxFile *file) |
Returns the mode of the specified file. | |
uid_t | cxGetFileUid (CxFile *file) |
Returns the user ID of the specified file. | |
gid_t | cxGetFileGid (CxFile *file) |
Returns the group ID of the specified file. | |
unsigned int | cxGetFileCompressedSize (CxFile *file) |
Returns the compressed size of the specified file. | |
unsigned int | cxGetFileSize (CxFile *file) |
Returns the uncompressed size of the specified file. | |
time_t | cxGetFileDate (CxFile *file) |
Returns the timestamp of the specified file. | |
char | cxIsFileLocal (CxFile *file) |
Returns whether or not the file is stored locally. | |
Iteration Functions | |
CxFile * | cxGetNextFile (CxFile *file) |
Returns the next file in a list of files. | |
CxFile * | cxGetPreviousFile (CxFile *file) |
Returns the previous file in a list of files. | |
Typedefs | |
typedef _CxFile | CxFile |
A single file. | |
typedef enum _CxFileType | CxFileType |
A type of file. | |
Enumerations | |
enum | _CxFileType { CX_FILETYPE_UNKNOWN = 0, CX_FILETYPE_NORMAL, CX_FILETYPE_SYMLINK, CX_FILETYPE_HARDLINK, CX_FILETYPE_CHAR_DEVICE, CX_FILETYPE_BLOCK_DEVICE, CX_FILETYPE_FIFO } |
A type of file. More... |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
A single file.
|
|
A type of file.
|
|
A type of file.
|
|
Destroys a CxFile structure.
|
|
Returns the archive that owns the specified file.
|
|
Returns the compressed size of the specified file.
|
|
Returns the timestamp of the specified file.
|
|
Returns the group ID of the specified file.
|
|
Returns the mode of the specified file.
|
|
Returns the name of the specified file.
|
|
Returns the specified file's parent directory.
|
|
Returns the full path to the specified file. This may include such non-physical elements as FTP sites, archives, etc. in the path.
|
|
Returns the full physical path to the file. If the file is non-local, this will be a temporary file.
|
|
Returns the uncompressed size of the specified file.
|
|
Gets the type of file.
|
|
Returns the user ID of the specified file.
|
|
Returns the next file in a list of files.
|
|
Returns the previous file in a list of files.
|
|
Returns whether or not the file is stored locally. If the file is located online, or within an archive, this will be 0. Otherwise, this will be 1.
|
|
Creates a new CxFile structure.
|
|
Sets the archive that owns the file. This should only be used by libcomprex.
|
|
Sets the compressed size of the specified file.
|
|
Sets the timestamp of the specified file.
|
|
Sets the group ID of the specified file.
|
|
Sets whether or not the file is stored locally. If the file is located online, or within an archive, this should be 0. Otherwise, this should be 1.
|
|
Sets the mode of the specified file.
|
|
Sets the base name of the specified file.
|
|
Sets the specified file's parent directory.
|
|
Sets the full path to the file. This may include such non-physical elements as FTP sites, archives, etc. in the path.
|
|
Sets the full physical path to the file. If the file is non-local, this should be a temporary file.
|
|
Sets the uncompressed size of the specified file.
|
|
Sets the type of file.
|
|
Sets the user ID of the specified file.
|