TAPI for directory operation calls
Overview
// typedefs typedef rpc_ptr rpc_dir_p; typedef struct rpc_dirent rpc_dirent; // structs struct rpc_dirent; // global functions void rpc_struct_dirent_props(rcf_rpc_server* rpcs, size_t* props); rpc_dir_p rpc_opendir(rcf_rpc_server* rpcs, const char* path); int rpc_closedir(rcf_rpc_server* rpcs, rpc_dir_p dirp); rpc_dirent* rpc_readdir(rcf_rpc_server* rpcs, rpc_dir_p dirp);
Detailed Documentation
Typedefs
typedef rpc_ptr rpc_dir_p
‘DIR *’ equivalent
typedef struct rpc_dirent rpc_dirent
‘struct dirent’ equivalent
Global Functions
void rpc_struct_dirent_props(rcf_rpc_server* rpcs, size_t* props)
Get properties of ‘struct dirent’ on target system (mainly information on which fields exist in ‘struct dirent’).
Parameters:
rpcs |
RPC server handle |
props |
properties of ‘struct dirent’ (OUT) |
Returns:
N/A
rpc_dir_p rpc_opendir(rcf_rpc_server* rpcs, const char* path)
Open a directory stream.
Parameters:
rpcs |
RPC server handle |
path |
Path to a directory |
Returns:
A pointer to the directory stream or NULL on failure
int rpc_closedir(rcf_rpc_server* rpcs, rpc_dir_p dirp)
Close a directory stream.
Parameters:
rpcs |
RPC server handle |
dirp |
Directory stream to close |
Returns:
0 on success or -1 on failure
rpc_dirent* rpc_readdir(rcf_rpc_server* rpcs, rpc_dir_p dirp)
Read next directory entry from a directory stream.
Parameters:
rpcs |
RPC server handle |
dirp |
Directory stream handle |
Returns:
A pointer to dirent structure or NULL if the end of the directory stream reached or an error occurred