/// support this.
/// \return true on success.
bool changePermission(unsigned long int mode) const;
+ // sets permission based on the file given as an argument
+ bool clonePermissions(FileName const & source);
/// remove pointed directory and all contents.
/// \return true on success.
friend bool equivalent(FileName const &, FileName const &);
/// Set for tracking of already visited file names.
/// Uses operator==() (which may be case insensitive), and not
- /// equvalent(), so that symlinks are not resolved.
+ /// equivalent(), so that symlinks are not resolved.
typedef std::set<FileName> FileNameSet;
/// Helper for public copyTo() to find circular symlink chains
bool copyTo(FileName const &, bool, FileNameSet &) const;
*/
void set(std::string const & filename, std::string const & buffer_path);
///
- void erase();
+ void erase() override;
///
bool saveAbsPath() const { return save_abs_path_; }
/// \param buffer_path if empty, uses `pwd`
std::string
mangledFileName(std::string const & dir = empty_string()) const;
+ /** Identical to mangledFileName, with the following additions:
+ *
+ * @encrypt_path allows using hash (SHA-256) instead of full path.
+ * @use_counter allows disabling the counter in the filename.
+ */
+ std::string
+ mangledFileName(std::string const & dir, bool use_counter, bool encrypt_path) const;
+
/// \return the absolute file name without its .gz, .z, .Z extension
std::string unzippedFileName() const;