GRVY-0.38.0
Miscellaneous File Path Utilities

Miscellaneous File Path Utilities

I/O Utilities for directory creation and various copy utilities. These routines all return 0 on success.

int grvy_check_file_path (const char *name_template)
 
int grvy_create_unique_dir (char *name_template)
 
int grvy_create_scratch_dir (char *name_template)
 
int grvy_copy_dir (const char *from_dir, const char *to_dir)
 

Detailed Description

I/O utilities for file path interaction.

Function Documentation

◆ 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_templatepath 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_dirinput directory
[in]to_diroutput 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_templatetemplate 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_templatetemplate directory name
Returns
0 if succeeds

Generated on Wed Jul 12 2023 16:53:23 for GRVY-0.38.0 by  doxygen 1.8.17