*/
void changeExtension(std::string const & extension);
+ /// Add extension to the file name if it is not already there
+ void ensureExtension(std::string const & extension);
+
static FileName fromFilesystemEncoding(std::string const & name);
/// get the current working directory
*/
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, wit the following additions:
+ /** 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.