diff options
author | GrapheneCt | 2020-07-21 17:39:17 -0400 |
---|---|---|
committer | Reiko Asakura | 2020-07-21 17:39:17 -0400 |
commit | cd9c1ead26ec0c0ab590cc570862e6d5d99195ed (patch) | |
tree | 6861968973333f8c2bfdc6c2278b92b4566fc4ed /include/user/kernel/iofilemgr/stat.h | |
parent | Refactor userland SceIofilemgr headers (diff) | |
download | vds-libraries-cd9c1ead26ec0c0ab590cc570862e6d5d99195ed.tar.gz |
Add async IO functions for userland
All credits go to https://github.com/GrapheneCt/
Diffstat (limited to 'include/user/kernel/iofilemgr/stat.h')
-rw-r--r-- | include/user/kernel/iofilemgr/stat.h | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/include/user/kernel/iofilemgr/stat.h b/include/user/kernel/iofilemgr/stat.h index 03b880f..e2fa913 100644 --- a/include/user/kernel/iofilemgr/stat.h +++ b/include/user/kernel/iofilemgr/stat.h @@ -2,7 +2,7 @@ #define _DOLCESDK_PSP2_KERNEL_IOFILEMGR_STAT_H_ #include <psp2/kernel/types.h> -#include <psp2/types.h> +#include <psp2/kernel/iofilemgr/async.h> #ifdef __cplusplus extern "C" { @@ -82,6 +82,50 @@ int sceIoGetstatByFd(SceUID fd, SceIoStat *buf); */ int sceIoChstatByFd(SceUID fd, const SceIoStat *buf, unsigned int cbit); +/** + * Make a directory file (asynchronous) + * + * @param dir - The path to the directory + * @param mode - Access mode (One or more ::SceIoAccessMode). + * @param asyncParam - parameters related to async operation. + * + * @return A non-negative integer is a valid op handle, anything else an error + */ +SceUID sceIoMkdirAsync(const char *dir, SceMode mode, SceIoAsyncParam* asyncParam); + +/** + * Remove a directory file (asynchronous) + * + * @param path - Removes a directory file pointed by the string path + * @param asyncParam - parameters related to async operation. + * + * @return A non-negative integer is a valid op handle, anything else an error + */ +SceUID sceIoRmdirAsync(const char *path, SceIoAsyncParam* asyncParam); + +/** + * Get the status of a file (asynchronous) + * + * @param file - The path to the file. + * @param stat - A pointer to a ::SceIoStat structure. + * @param asyncParam - parameters related to async operation. + * + * @return A non-negative integer is a valid op handle, anything else an error + */ +SceUID sceIoGetstatAsync(const char *file, SceIoStat *stat, SceIoAsyncParam* asyncParam); + +/** + * Change the status of a file (asynchronous) + * + * @param file - The path to the file. + * @param stat - A pointer to a ::SceIoStat structure. + * @param bits - Bitmask defining which bits to change. + * @param asyncParam - parameters related to async operation. + * + * @return A non-negative integer is a valid op handle, anything else an error + */ +SceUID sceIoChstatAsync(const char *file, SceIoStat *stat, int bits, SceIoAsyncParam* asyncParam); + #ifdef __cplusplus } #endif |