LLVM  16.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, Optional< sys::fs::perms > OverwritePermissions=std::nullopt)
 Apply stored permissions to the OutputFilename. More...
 

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 117 of file FileUtilities.h.

Member Function Documentation

◆ apply()

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

◆ create()

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

Definition at line 329 of file FileUtilities.cpp.

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


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