summaryrefslogtreecommitdiff
path: root/include/user/kernel/iofilemgr_dirent.h
blob: 741450b1131adb26cf87eba33b61844435f322a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _DOLCESDK_PSP2_KERNEL_IOFILEMGR_DIRENT_H_
#define _DOLCESDK_PSP2_KERNEL_IOFILEMGR_DIRENT_H_

#include_next <kernel/iofilemgr_dirent.h>

#include <kernel/iofilemgr_async.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
  * 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

#endif	/* _DOLCESDK_PSP2_KERNEL_IOFILEMGR_DIRENT_H_ */