Go to the source code of this file.
Legato Directory API include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
bool le_dir_IsDir |
( |
const char * |
pathNamePtr | ) |
|
Checks if the path refers to a directory.
- Returns
- true if the path refers to a directory. false otherwise.
- Parameters
-
[in] | pathNamePtr | The path to the directory. |
le_result_t le_dir_Make |
( |
const char * |
pathNamePtr, |
|
|
mode_t |
mode |
|
) |
| |
Creates a directory with permissions specified in mode.
- Note
- Permissions for the created directory will depend on the calling process' umask.
- Returns
- LE_OK if successful. LE_DUPLICATE if the directory already exists. LE_FAULT if there was an error.
- Parameters
-
[in] | pathNamePtr | Path name to the directory to create. |
[in] | mode | Permissions for the directory. |
le_result_t le_dir_MakePath |
( |
const char * |
pathNamePtr, |
|
|
mode_t |
mode |
|
) |
| |
Creates all directories in the path. If some (or all) directories in the path already exist, those directories are left as is. All created directories have the same permissions (specified in mode).
- Note
- Permissions for the created directories will depend on the calling process' umask.
- Returns
- LE_OK if successful. LE_FAULT if there was an error.
- Parameters
-
[in] | pathNamePtr | Path containing all the directories to create. |
[in] | mode | Permissions for all created directories. |
le_result_t le_dir_RemoveRecursive |
( |
const char * |
pathNamePtr | ) |
|
Removes a directory by first recursively removing sub-directories, files, symlinks, hardlinks, devices, etc. Symlinks are not followed; only the links themselves are deleted.
A file or device may not be able to be removed if it is busy, in which case an error message is logged and LE_FAULT is returned.
- Returns
- LE_OK if successful. LE_FAULT if there was an error.
- Parameters
-
[in] | pathNamePtr | Path to the directory to remove. |