]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.h
Add string << operators for the other streams as well, and removes
[lyx.git] / src / support / filetools.h
index b2df54ecfcc32f7c916d717e68b8d8f70388e6b1..4c5bc161bccded82e5a21341ded56449bba2c6b7 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++-*-
 /* lyx-filetool.h : tools functions for file/path handling
    this file is part of LyX, the High Level Word Processor
-   Copyright 1995-2000, Matthias Ettrich and the LyX Team
+   Copyright 1995-2001, Matthias Ettrich and the LyX Team
 */
 
 #ifndef LYX_FILETOOL_H
 #pragma interface
 #endif
 
-#include <cstdlib>
-#include <fcntl.h>
-#include <cerrno>
-
 #include <vector>
-
-#include "debug.h"
 #include "LString.h"
-#include "support/lstrings.h"
 
 
 ///
@@ -61,11 +54,10 @@ std::vector<string> const DirList(string const & dir,
 
 /** Is directory read only?
   returns 
-    1: dir writeable
-    0: not writeable
-   -1: error- couldn't find out, or unsure
+    true: dir writeable
+    false: not writeable
 */
-int IsDirWriteable (string const & path);
+bool IsDirWriteable (string const & path);
 
 /** Is a file readable ?
   Returns true if the file `path' is readable.
@@ -124,9 +116,6 @@ string const MakeLatexName(string const & file);
 /// Put the name in quotes suitable for the current shell
 string const QuoteName(string const & file);
 
-/// Is a filename/path absolute?
-bool AbsolutePath(string const & path);
-
 /// Add a filename to a path. Any path from filename is stripped first.
 string const AddName(string const & path, string const & fname);
 
@@ -143,6 +132,9 @@ ChangeExtension(string const & oldname, string const & extension);
 /// Return the extension of the file (not including the .)
 string const GetExtension(string const & name);
 
+/// Returns true is path is absolute
+bool AbsolutePath(string const & path);
+
 /// Create absolute path. If impossible, don't do anything
 string const ExpandPath(string const & path);
 
@@ -179,15 +171,9 @@ string const NormalizePath(string const & path);
 /// Strips path from filename
 string const OnlyFilename(string const & fname);
 
-/// Strips filename from path
-string const BasePath(string const & fname);
-
 /// Get the contents of a file as a huge string
 string const GetFileContents(string const & fname);
 
-/// Cleanup a path if necessary. Currently only useful with OS/2
-string const CleanupPath(string const & path);
-
 /** Check and Replace Environmentvariables ${NAME} in Path.
     Replaces all occurences of these, if they are found in the
     environment.
@@ -199,10 +185,10 @@ string const ReplaceEnvironmentPath(string const & path);
    Returns true if successful */
 bool LyXReadLink(string const & file, string & Link);
 
-/* Uses kpsewhich to find tex files */
+/// Uses kpsewhich to find tex files
 string const findtexfile(string const & fil, string const & format);
 
-/* remove the autosave-file and give a Message if it can't be done */
+/// remove the autosave-file and give a Message if it can't be done
 void removeAutosaveFile(string const & filename);
 
 #endif