LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::FilePermissionsApplier Class Reference

FilePermssionsApplier helps to copy permissions from an input file to an output one. More...

#include "llvm/Support/FileUtilities.h"

Public Member Functions

Error apply (StringRef OutputFilename, bool CopyDates=false, std::optional< sys::fs::perms > OverwritePermissions=std::nullopt)
 Apply stored permissions to the OutputFilename.
 

Static Public Member Functions

static Expected< FilePermissionsAppliercreate (StringRef InputFilename)
 

Detailed Description

FilePermssionsApplier helps to copy permissions from an input file to an output one.

It memorizes the status of the input file and can apply permissions and dates to the output file.

Definition at line 82 of file FileUtilities.h.

Member Function Documentation

◆ apply()

Error FilePermissionsApplier::apply ( StringRef  OutputFilename,
bool  CopyDates = false,
std::optional< sys::fs::perms OverwritePermissions = std::nullopt 
)

◆ create()

Expected< FilePermissionsApplier > FilePermissionsApplier::create ( StringRef  InputFilename)
static

Definition at line 271 of file FileUtilities.cpp.

References llvm::createFileError(), and llvm::sys::fs::status().


The documentation for this class was generated from the following files: