cctools
file_link_recursive.h File Reference

Go to the source code of this file.

Functions

int file_link_recursive (const char *source, const char *target, int allow_symlink)
 Make a hard link from source to target. More...
 

Detailed Description

Make deep links to directories.

Function Documentation

◆ file_link_recursive()

int file_link_recursive ( const char *  source,
const char *  target,
int  allow_symlink 
)

Make a hard link from source to target.

If source is a directory, do it recursively.

Parameters
sourceThe source path to link to.
targetThe target path to create.
allow_symlinkIf true, attempt symbolic links if hard links fail.
Returns
1 on success, 0 on failure.