summaryrefslogtreecommitdiff
path: root/include/user/kernel/iofilemgr/dirent.h
diff options
context:
space:
mode:
authorGrapheneCt2020-07-21 17:39:17 -0400
committerReiko Asakura2020-07-21 17:39:17 -0400
commitcd9c1ead26ec0c0ab590cc570862e6d5d99195ed (patch)
tree6861968973333f8c2bfdc6c2278b92b4566fc4ed /include/user/kernel/iofilemgr/dirent.h
parentRefactor userland SceIofilemgr headers (diff)
downloadvds-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/dirent.h')
-rw-r--r--include/user/kernel/iofilemgr/dirent.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/user/kernel/iofilemgr/dirent.h b/include/user/kernel/iofilemgr/dirent.h
index e343910..1d06ffd 100644
--- a/include/user/kernel/iofilemgr/dirent.h
+++ b/include/user/kernel/iofilemgr/dirent.h
@@ -1,6 +1,7 @@
#ifndef _DOLCESDK_PSP2_KERNEL_IOFILEMGR_DIRENT_H_
#define _DOLCESDK_PSP2_KERNEL_IOFILEMGR_DIRENT_H_
+#include <psp2/kernel/iofilemgr/async.h>
#include <psp2/kernel/iofilemgr/stat.h>
#ifdef __cplusplus
@@ -51,6 +52,37 @@ int sceIoDclose(SceUID fd);
*/
int sceIoDread(SceUID fd, SceIoDirent *buf);
+/**
+ * Open a directory (asynchronous)
+ *
+ * @param dirname - The directory to open for reading.
+ * @param asyncParam - parameters related to async operation.
+ *
+ * @return If >= 0 then a valid op handle, otherwise a Sony error code.
+ */
+SceUID sceIoDopenAsync(const char *dirname, SceIoAsyncParam* asyncParam);
+
+/**
+ * Reads an entry from an opened file descriptor (asynchronous)
+ *
+ * @param fd - Already opened file descriptor (using ::sceIoDopen or ::sceIoDopenAsync)
+ * @param dir - Pointer to a ::SceIoDirent structure to hold the file information
+ * @param asyncParam - parameters related to async operation.
+ *
+ * @return If >= 0 then a valid op handle, otherwise a Sony error code.
+ */
+SceUID sceIoDreadAsync(SceUID fd, SceIoDirent *dir, SceIoAsyncParam* asyncParam);
+
+/**
+ * Close an opened directory file descriptor (asynchronous)
+ *
+ * @param fd - Already opened file descriptor (using ::sceIoDopen or ::sceIoDopenAsync)
+ * @param asyncParam - parameters related to async operation.
+ *
+ * @return If >= 0 then a valid op handle, otherwise a Sony error code.
+ */
+SceUID sceIoDcloseAsync(SceUID fd, SceIoAsyncParam* asyncParam);
+
#ifdef __cplusplus
}
#endif