diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2017-02-15 22:56:06 +0100 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2017-02-15 22:56:06 +0100 |
| commit | 83e87bd113dc957d4a9185cd6ff67c2268602436 (patch) | |
| tree | b6a41035abbf5d4a34f05571571ff65257ec5b21 /include | |
| parent | 5f4bfdc6087b0febba7fea051bc0bfae83b0bdff (diff) | |
ext4: add methods to access file mode, owner, atime, mtime, ctime
Diffstat (limited to 'include')
| -rw-r--r-- | include/ext4.h | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/include/ext4.h b/include/ext4.h index 745d41e..ec74689 100644 --- a/include/ext4.h +++ b/include/ext4.h @@ -348,32 +348,64 @@ uint64_t ext4_fsize(ext4_file *f); * @param path to file/dir/link * @param mode new mode bits (for example 0777) * @return standard error code*/ -int ext4_chmod(const char *path, uint32_t mode); +int ext4_mode_set(const char *path, uint32_t mode); + + +/**@brief Get file/directory/link mode bits + * @param path to file/dir/link + * @param mode new mode bits (for example 0777) + * @return standard error code*/ +int ext4_mode_get(const char *path, uint32_t *mode); /**@brief Change file owner and group * @param path to file/dir/link * @param uid user id * @param gid group id * @return standard error code*/ -int ext4_chown(const char *path, uint32_t uid, uint32_t gid); +int ext4_owner_set(const char *path, uint32_t uid, uint32_t gid); + +/**@brief Get file/directory/link owner and group + * @param path to file/dir/link + * @param uid user id + * @param gid group id + * @return standard error code*/ +int ext4_owner_get(const char *path, uint32_t *uid, uint32_t *gid); + +/**@brief Set file/directory/link access time + * @param path to file/dir/link + * @param atime access timestamp + * @return standard error code*/ +int ext4_atime_set(const char *path, uint32_t atime); + +/**@brief Set file/directory/link modify time + * @param path to file/dir/link + * @param mtime modify timestamp + * @return standard error code*/ +int ext4_mtime_set(const char *path, uint32_t mtime); + +/**@brief Set file/directory/link change time + * @param path to file/dir/link + * @param ctime change timestamp + * @return standard error code*/ +int ext4_ctime_set(const char *path, uint32_t ctime); -/**@brief Set file access time +/**@brief Get file/directory/link access time * @param path to file/dir/link * @param atime access timestamp * @return standard error code*/ -int ext4_file_set_atime(const char *path, uint32_t atime); +int ext4_atime_get(const char *path, uint32_t *atime); -/**@brief Set file modify time +/**@brief Get file/directory/link modify time * @param path to file/dir/link * @param mtime modify timestamp * @return standard error code*/ -int ext4_file_set_mtime(const char *path, uint32_t mtime); +int ext4_mtime_get(const char *path, uint32_t *mtime); -/**@brief Set file change time +/**@brief Get file/directory/link change time * @param path to file/dir/link * @param ctime change timestamp * @return standard error code*/ -int ext4_file_set_ctime(const char *path, uint32_t ctime); +int ext4_ctime_get(const char *path, uint32_t *ctime); /**@brief Create symbolic link * @param target destination path |
