Example #1
0
status_t readdir(int handle, char out_path[], size_t length)
{
	FileDescriptor *descriptor = static_cast<FileDescriptor*>(GetResource(handle, OBJ_FD));
	if (descriptor == 0)
		return E_BAD_HANDLE;

	status_t ret = descriptor->ReadDir(out_path, length);
	descriptor->ReleaseRef();
	return ret;
}