]> git.lyx.org Git - features.git/blobdiff - src/support/FileName.h
Revert "WIP: refactor Systemcall"
[features.git] / src / support / FileName.h
index a0da84175a946f7c17f9deeec9dacb245634be7c..95940a9235a71234b6518cd3487d6e7796d8ef81 100644 (file)
@@ -177,6 +177,9 @@ public:
        */
        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
@@ -260,7 +263,7 @@ public:
         */
        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`
@@ -291,7 +294,7 @@ public:
        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.