]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.h
TR1: check in cmake for GCC version, fallback in checktr1.h for other build systems...
[lyx.git] / src / support / filetools.h
index 2ea500a8aaa73858c28fc4343615f7004596f89f..da7203cb230be9489dd1797b2907c5b6c85907cc 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -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,16 +61,16 @@ 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);
+bool isLyXFileName(std::string const & filename);
 
 ///
-bool isSGMLFilename(std::string const & filename);
+bool isSGMLFileName(std::string const & filename);
 
 ///
-bool isValidLaTeXFilename(std::string const & filename);
+bool isValidLaTeXFileName(std::string const & filename);
 
 /** Returns the path of a library data file.
     Search the file name.ext in the subdirectory dir of
@@ -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);
 
@@ -230,7 +225,7 @@ makeRelPath(docstring const & abspath, docstring const & basepath);
 std::string const onlyPath(std::string const & fname);
 
 /// Strips path from filename
-std::string const onlyFilename(std::string const & fname);
+std::string const onlyFileName(std::string const & fname);
 
 /** Check and Replace Environmentvariables ${NAME} in Path.
     Replaces all occurences of these, if they are found in the
@@ -255,9 +250,6 @@ bool readLink(FileName const & file, FileName & link);
 FileName const findtexfile(std::string const & fil,
                              std::string const & format);
 
-/// remove the autosave-file and give a Message if it can't be done
-void removeAutosaveFile(std::string const & filename);
-
 /// read the BoundingBox entry from a ps/eps/pdf-file
 std::string const readBB_from_PSFile(FileName const & file);