namespace lyx {
namespace support {
-/// remove directory and all contents, returns 0 on success
-int destroyDir(std::string const & tmpdir);
+/// remove directory and all contents, returns true on success
+bool destroyDir(std::string const & tmpdir);
/// Creates the per buffer temporary directory
std::string const createBufferTmpDir();
*/
bool IsFileReadable (std::string const & path);
-/** Is file read only?
- returns
- 1: read-write
- 0: read_only
- -1: error (doesn't exist, no access, anything else)
- */
-int IsFileWriteable (std::string const & path);
-
///
bool IsLyXFilename(std::string const & filename);
i18nLibFileSearch(std::string const & dir, std::string const & name,
std::string const & ext = std::string());
-/** Takes a command such as "sh $$s/convertDefault.sh file.in file.out"
- * and replaces "$$s/" with the path to the "most important" of LyX's
- * script directories containing this script. If the script is not found,
- * "$$s/" is removed. Executing the command will still fail, but the
- * error message will make some sort of sense ;-)
+/** Takes a command such as "sh $$s/scripts/convertDefault.sh file.in file.out"
+ * and replaces "$$s/" with the path to the LyX support directory containing
+ * this script. If the script is not found, "$$s/" is removed. Executing the
+ * command will still fail, but the error message will make some sort of
+ * sense ;-)
*/
std::string const LibScriptSearch(std::string const & command);
-///
-std::string const GetEnv(std::string const & envname);
-
-/// A helper function.
-std::string const GetEnvPath(std::string const & name);
-
/// Substitutes active latex characters with underscores in filename
std::string const MakeLatexName(std::string const & file);
/// Return the extension of the file (not including the .)
std::string const GetExtension(std::string const & name);
-/// Guess the file format name (as in Format::name()) from contents
+/** Guess the file format name (as in Format::name()) from contents.
+ Normally you don't want to use this directly, but rather
+ Formats::getFormatFromFile().
+ */
std::string const getFormatFromContents(std::string const & name);
/// check for zipped file