1.2.7.4.25 SYS_FS_DirOpen Function
1.2.7.4.25 C
SYS_FS_HANDLE SYS_FS_DirOpen
(
const char* path
);
1.2.7.4.25 Summary
Open a directory.
1.2.7.4.25 Description
This function opens the requested directory.
1.2.7.4.25 Precondition
The volume on which the directory is present should be mounted.
1.2.7.4.25 Parameters
| Parameters | Description |
|---|---|
| path | Path to the directory along with the volume name. The string of volume and directory name has to be preceded by "/mnt/". Also, the volume name and directory name has to be separated by a slash "/". If the directory specified is only the root directory, the path has to be ended with "/". |
1.2.7.4.25 Returns
On success - A valid handle to the directory will be returned.
On failure - SYS_FS_HANDLE_INVALID will be returned. The reason for the failure can be retrieved with SYS_FS_Error.
1.2.7.4.25 Example
SYS_FS_HANDLE dirHandle;
dirHandle = SYS_FS_DirOpen("/mnt/myDrive/Dir1");
// For root directory, end with a "/"
// dirHandle = SYS_FS_DirOpen("/mnt/myDrive/");
if(dirHandle != SYS_FS_HANDLE_INVALID)
{
// Directory open is successful
}
1.2.7.4.25 Remarks
None.
