llvm::sys::fs::getPermissions

Get file permissions.

Synopsis

Declared in <llvm/Support/FileSystem.h>

ErrorOr<perms>
getPermissions(Twine const& Path);

Description

NOTE

On Windows, if the file does not have the FILE_ATTRIBUTE_READONLY attribute, all_all will be returned. Otherwise, all_read | all_exe will be returned.

Return Value

the permissions if they were successfully retrieved, otherwise a platform-specific error_code.

Parameters

NameDescription
PathFile to get permissions from.