]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.h
add FileName::renameTo() method.
[lyx.git] / src / support / FileName.h
index be47e158f76a6364736f8731867b9361068c13bc..328602bf34e692aaa968e9def85116ff5ceeb767 100644 (file)
@@ -20,6 +20,9 @@
 namespace lyx {
 namespace support {
 
+/// Defined in "FileNameList.h".
+class FileNameList;
+
 /**
  * Class for storing file names.
  * The file name may be empty. If it is not empty it is an absolute path.
@@ -82,6 +85,8 @@ public:
        bool isWritable() const;
        /// return true when file/directory is writable (write test file)
        bool isDirWritable() const;
+       /// \return list other files in the directory having optional extension 'ext'.
+       FileNameList dirList(std::string const & ext) const;
        
        /// copy a file
        /// \return true when file/directory is writable (write test file)
@@ -93,6 +98,11 @@ public:
        /// \retrun true on success.
        bool removeFile() const;
 
+       /// rename pointed file.
+       /// \retrun true on success.
+       bool renameTo(FileName const & target) const;
+
+
        /// remove directory and all contents, returns true on success
        bool destroyDirectory() const;
        /// Creates directory. Returns true on success
@@ -226,7 +236,6 @@ private:
 bool operator==(DocFileName const &, DocFileName const &);
 bool operator!=(DocFileName const &, DocFileName const &);
 
-
 } // namespace support
 } // namespace lyx