]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.h
Convert makeRelPath to docstring (from Michael Gerz)
[lyx.git] / src / support / filetools.h
index aadb39c4b6c3c253029848633d618e8a3c3d5b42..bab3b1285726e62f807ffcfc526bc6df8e904dd2 100644 (file)
@@ -73,7 +73,7 @@ FileName const fileSearch(std::string const & path,
                             search_mode mode = standard_mode);
 
 /// Returns a vector of all files in directory dir having extension ext.
-std::vector<std::string> const dirList(FileName const & dir,
+std::vector<FileName> const dirList(FileName const & dir,
                                       std::string const & ext = std::string());
 
 /** Is directory read only?
@@ -81,7 +81,7 @@ std::vector<std::string> const dirList(FileName const & dir,
     true: dir writeable
     false: not writeable
 */
-bool isDirWriteable(std::string const & path);
+bool isDirWriteable(FileName const & path);
 
 /** Is a file readable ?
   Returns true if the file `path' is readable.
@@ -236,7 +236,7 @@ std::string const expandPath(std::string const & path);
   If relpath is absolute, just use that.
   If basepath doesn't exist use CWD.
   */
-std::string const makeAbsPath(std::string const & RelPath = std::string(),
+FileName const makeAbsPath(std::string const & RelPath = std::string(),
                              std::string const & BasePath = std::string());
 
 /** Creates a nice compact path for displaying. The parameter
@@ -252,8 +252,8 @@ makeDisplayPath(std::string const & path, unsigned int threshold = 1000);
   different, then the absolute path will be used as relative path
   WARNING: the absolute path and base path must really be absolute paths!!!
   */
-std::string const
-makeRelPath(std::string const & abspath, std::string const & basepath);
+docstring const
+makeRelPath(docstring const & abspath, docstring const & basepath);
 
 /// Strip filename from path name
 std::string const onlyPath(std::string const & fname);
@@ -283,7 +283,14 @@ bool readLink(std::string const & file,
              std::string & link,
              bool resolve = false);
 
-/// Uses kpsewhich to find tex files
+/**
+ * Search a TeX file in all locations the latex compiler would search it,
+ * with the help of kpsewhich.
+ * The current working directory must be set correctly, so that relative
+ * names work.
+ * \param fil The filename to search
+ * \param format The file format as used by kpsewhich, e.g. "bib", "bst" etc.
+ */
 FileName const findtexfile(std::string const & fil,
                              std::string const & format);