Project

General

Profile

« Previous | Next » 

Revision dbbd2afa

Added by david.sorber over 2 years ago

  • ID dbbd2afaf6410ef19291da7d0d18b16407571023
  • Parent 4fd46efa

WIP; adding options to preserve file/directory permissions, owner, and
group.

View differences:

src/CopyManagerOptions.h
// Log option defaults
static const bool DEFAULT_ENABLE_LOG{false};
static const bool DEFAULT_LOG_TO_STDERR{true};
static const bool DEFAULT_LOG_TO_STDERR{false};
static const int DEFAULT_LOG_LEVEL{3};
static inline const std::string DEFAULT_LOG_FILE_PATH{"./copyfile.log"};
static const uint32_t DEFAULT_FC_THRESHOLD{1000};
static const uint32_t DEFAULT_NUM_COPY_THREADS{4};
static const bool DEFAULT_COPY_TOPLEVEL{false};
static const bool DEFAULT_PRESERVE_PERMS{false};
static const bool DEFAULT_PRESERVE_OWNER{false};
static const bool DEFAULT_PRESERVE_GROUP{false};
CopyManagerOptions(
const std::string& srcPath,
const std::string& destPath,
......
int logLevel,
uint32_t flowCtrlThreshold,
uint32_t numProcThreads,
bool copyTopLevel);
bool copyTopLevel,
bool preservePerms,
bool preserveOwner,
bool preserveGroup);
~CopyManagerOptions();
......
return m_copyTopLevel;
}
inline bool getPreservePerms() const
{
return m_preservePerms;
}
inline bool getPreserveOwner() const
{
return m_preserveOwner;
}
inline bool getPreserveGroup() const
{
return m_preserveGroup;
}
//--- Setters -------------------------------------------------------------
inline void setDestPath(const std::string& destPath)
{
......
uint32_t m_numCopyThreads; // Number of copy threads to spawn
bool m_copyTopLevel; // Copy top level source dir to dest dir
bool m_preservePerms; // Preserve directory/file permissions
bool m_preserveOwner; // Preserve directory/file owner
bool m_preserveGroup; // Preserve directory/file group
};
} // namespace DBS

Also available in: Unified diff