]> git.lyx.org Git - features.git/blobdiff - src/support/FileName.h
more use of support::FileName.
[features.git] / src / support / FileName.h
index 33fde2a2db9da50fb198cb7d290342f941b980dc..a2b1c3c48d6fe3b7ca19cfd611109dab28fb063b 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef FILENAME_H
 #define FILENAME_H
 
+#include "strfwd.h"
+
 #include <string>
 #include <ctime>
 
@@ -70,6 +72,9 @@ public:
        /// return true when file/directory is writable (write test file)
        bool isDirWritable() const;
        
+       /// return true when file/directory is writable (write test file)
+       bool copyTo(FileName const & target, bool noclobber) const;
+
        /// remove directory and all contents, returns true on success
        bool destroyDirectory() const;
        /// Creates directory. Returns true on success
@@ -98,6 +103,15 @@ public:
        /// \p mask must be in filesystem encoding
        static FileName tempName(FileName const & dir = FileName(),
                                                std::string const & mask = std::string());
+
+       /// filename without path
+       std::string onlyFileName() const;
+       /// path without file name
+       std::string onlyPath() const;
+       /// used for display in the Gui
+       docstring displayName(int threshold = 1000) const;
+
+
 protected:
        /// The absolute file name.
        /// The encoding is currently unspecified, anything else than ASCII