IsDirWritable

Check if a directory is writable by creating a temporary file on it.

Synopsis

Declared in <util/fs_helpers.h>

bool
IsDirWritable(fs::path const& dir_path);

Exceptions

NameThrown on
std::runtime_errorif dir_path is not a directory.

Return Value

true if a temporary file could be created and removed, false otherwise.

Parameters

NameDescription
dir_path [in]Path of the directory to test