]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.h
abdel likes short code
[lyx.git] / src / support / filetools.h
index 2ea500a8aaa73858c28fc4343615f7004596f89f..dadde24c5d3320aaeb01f9c9aa78161b90f47a3a 100644 (file)
@@ -13,7 +13,6 @@
 #define LYX_FILETOOL_H
 
 #include "support/docstring.h"
-#include "support/FileName.h"
 
 #include <utility>
 #include <string>
@@ -21,8 +20,7 @@
 namespace lyx {
 namespace support {
 
-/// Creates the per buffer temporary directory
-std::string const createBufferTmpDir();
+class FileName;
 
 /** Creates the global LyX temp dir.
   \p deflt can be an existing directory name. In this case a new directory
@@ -48,11 +46,11 @@ FileName const fileOpenSearch(std::string const & path,
 
 /// How to search files
 enum search_mode {
-       // The file must exist (return an empty file name otherwise)
-       standard_mode,
+       /// The file must exist (return an empty file name otherwise)
+       must_exist,
        /// Only do file name expansion, return the complete name even if
        /// the file does not exist
-       allow_unreadable
+       may_not_exist
 };
 
 /** Returns the real name of file name in directory path, with optional
@@ -63,7 +61,7 @@ enum search_mode {
 FileName const fileSearch(std::string const & path,
                             std::string const & name,
                             std::string const & ext = std::string(),
-                            search_mode mode = standard_mode);
+                            search_mode mode = must_exist);
 
 ///
 bool isLyXFilename(std::string const & filename);
@@ -197,9 +195,6 @@ std::string const unzippedFileName(std::string const & zipped_file);
 FileName const unzipFile(FileName const & zipped_file,
                         std::string const & unzipped_file = std::string());
 
-/// Returns true is path is absolute
-bool absolutePath(std::string const & path);
-
 /// Create absolute path. If impossible, don't do anything
 std::string const expandPath(std::string const & path);