I/O utilities for file path interaction.
◆ grvy_check_file_path()
int grvy_check_file_path |
( |
const char * |
name_template | ) |
|
Checks a desired output pathname and creates any non-existing parent directories. The Unix pathname to check can be a relative or absolute path.
- Parameters
-
[in] | name_template | path to check |
- Returns
0
if succeeds
◆ grvy_copy_dir()
int grvy_copy_dir |
( |
const char * |
from_dir, |
|
|
const char * |
to_dir |
|
) |
| |
Recursively copies contents of existing directory (from_dir) to a new directory (to_dir). If to_dir does not exist, it will be created; otherwise it must be empty.
- Parameters
-
[in] | from_dir | input directory |
[in] | to_dir | output directory |
- Returns
0
if succeeds.
◆ grvy_create_scratch_dir()
int grvy_create_scratch_dir |
( |
char * |
name_template | ) |
|
Identical to grvy_create_unique_dir(), except that the new directory and all of its contents are deleted when the process exits.
- Parameters
-
[in,out] | name_template | template directory name |
- Returns
0
if succeeds
◆ grvy_create_unique_dir()
int grvy_create_unique_dir |
( |
char * |
name_template | ) |
|
Creates a new, unique directory with 0700 permissions using the provided name_template. The last six characters of name_template must be XXXXXX, and name_template is modified with the unique name upon return.
- Parameters
-
[in,out] | name_template | template directory name |
- Returns
0
if succeeds