libsqsh v1.5.1
|
Go to the source code of this file.
Functions | |
bool | sqsh_easy_file_exists (struct SqshArchive *archive, const char *path, int *err) |
checks if a file exists. | |
uint8_t * | sqsh_easy_file_content (struct SqshArchive *archive, const char *path, int *err) |
retrieves the content of a file. | |
uint64_t | sqsh_easy_file_size2 (struct SqshArchive *archive, const char *path, int *err) |
retrieves the size of a file. | |
size_t | sqsh_easy_file_size (struct SqshArchive *archive, const char *path, int *err) |
retrieves the size of a file. | |
mode_t | sqsh_easy_file_permission (struct SqshArchive *archive, const char *path, int *err) |
retrieves unix permissions of a file. | |
uint32_t | sqsh_easy_file_mtime2 (struct SqshArchive *archive, const char *path, int *err) |
retrieves the modification time of a file. | |
time_t | sqsh_easy_file_mtime (struct SqshArchive *archive, const char *path, int *err) |
retrieves the modification time of a file. | |
char ** | sqsh_easy_directory_list (struct SqshArchive *archive, const char *path, int *err) |
retrieves the contents of a directory as a list of file names | |
char ** | sqsh_easy_directory_list_path (struct SqshArchive *archive, const char *path, int *err) |
retrieves the contents of a directory as a list of file paths | |
char ** | sqsh_easy_tree_traversal (struct SqshArchive *archive, const char *path, int *err) |
char ** | sqsh_easy_xattr_keys (struct SqshArchive *archive, const char *path, int *err) |
retrieves all xattr keys of a file or directory. | |
char * | sqsh_easy_xattr_get (struct SqshArchive *archive, const char *path, const char *key, int *err) |
retrieves the value of a xattr key of a file or directory. | |
Definition in file sqsh_easy.h.
char ** sqsh_easy_directory_list | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the contents of a directory as a list of file names
The returned list needs to be released with free()
.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
char ** sqsh_easy_directory_list_path | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the contents of a directory as a list of file paths
The returned list needs to be released with free()
.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
uint8_t * sqsh_easy_file_content | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the content of a file.
The content is not null terminated. The size of the content can be retrieved with sqsh_file_size. The returned pointer needs to be released with free()
.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
bool sqsh_easy_file_exists | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
checks if a file exists.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
time_t sqsh_easy_file_mtime | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the modification time of a file.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
uint32_t sqsh_easy_file_mtime2 | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the modification time of a file.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
mode_t sqsh_easy_file_permission | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves unix permissions of a file.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
size_t sqsh_easy_file_size | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the size of a file.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
uint64_t sqsh_easy_file_size2 | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves the size of a file.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |
char ** sqsh_easy_tree_traversal | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
char * sqsh_easy_xattr_get | ( | struct SqshArchive * | archive, |
const char * | path, | ||
const char * | key, | ||
int * | err ) |
retrieves the value of a xattr key of a file or directory.
The returned pointer needs to be released with free()
.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[in] | key | The xattr key. |
[out] | err | Pointer to an int where the error code will be stored. |
char ** sqsh_easy_xattr_keys | ( | struct SqshArchive * | archive, |
const char * | path, | ||
int * | err ) |
retrieves all xattr keys of a file or directory.
The returned list needs to be released with free()
.
[in] | archive | The sqsh archive context. |
[in] | path | The path the file or directory. |
[out] | err | Pointer to an int where the error code will be stored. |