svn_io_set_file_executable

Function svn_io_set_file_executable 

Source
pub unsafe extern "C" fn svn_io_set_file_executable(
    path: *const c_char,
    executable: svn_boolean_t,
    ignore_enoent: svn_boolean_t,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Set @a path’s “executability” (but do nothing if it is a symlink).

@a path is the utf8-encoded path to the file. If @a executable is @c TRUE, then make the file executable. If @c FALSE, make it non-executable. If @a ignore_enoent is @c TRUE, don’t fail if the target file doesn’t exist.

When making the file executable on operating systems with unix style permissions, never add an execute permission where there is not already a read permission: that is, only make the file executable for the user, group or world if the corresponding read permission is already set for user, group or world.

When making the file non-executable on operating systems with unix style permissions, remove all execute permissions.

On other operating systems, toggle the file’s “executability” as much as the operating system allows.

@note If @a path is a directory, act on it as though it were a file, as described above, but note that you probably don’t want to call this function on directories. We have left it effective on directories for compatibility reasons, but as its name implies, it should be used only for files.