environment.cpp
filetools.cpp
gzstream.cpp
- getcwd.cpp
gettext.cpp
kill.cpp
lstrings.cpp
bool rerun = false; // rerun requested
// The class LaTeX does not know the temp path.
- theBufferList().updateIncludedTeXfiles(getcwd().absFilename(),
+ theBufferList().updateIncludedTeXfiles(FileName::getcwd().absFilename(),
runparams);
// Never write the depfile if an error was encountered.
*
* Up to two optional extra buttons are allowed for specifying
* additional directories in the navigation (an empty
- * directory is interpreted as getcwd())
+ * directory is interpreted as FileName::getcwd())
*/
FileDialog(docstring const & title, kb_action a = LFUN_SELECT_FILE_SYNC);
}
+FileName FileName::getcwd()
+{
+ return FileName(".");
+}
+
+
time_t FileName::lastModified() const
{
return d->fi.lastModified().toTime_t();
/// temporary directory as given by 'package().temp_dir()'.
static FileName tempName(std::string const & mask = empty_string());
+ /// get the current working directory
+ static FileName getcwd();
+
/// filename without path
std::string onlyFileName() const;
/// path without file name
ForkedCalls.h \
gettext.cpp \
gettext.h \
- getcwd.cpp \
gzstream.cpp \
gzstream.h \
kill.cpp \
: popped_(false)
{
if (!path.empty()) {
- pushedDir_ = getcwd();
+ pushedDir_ = FileName::getcwd();
if (pushedDir_.empty() || !path.chdir()) {
/* FIXME: throw */
if (os::is_absolute_path(basePath))
tempBase = basePath;
else
- tempBase = addPath(getcwd().absFilename(), basePath);
+ tempBase = addPath(FileName::getcwd().absFilename(), basePath);
// Handle /./ at the end of the path
while (suffixIs(tempBase, "/./"))
rTemp = split(rTemp, temp, '/');
if (temp == ".")
- return getcwd().absFilename() + '/' + rTemp;
+ return FileName::getcwd().absFilename() + '/' + rTemp;
if (temp == "~")
return package().home_dir().absFilename() + '/' + rTemp;
+++ /dev/null
-/**
- * \file getcwd.cpp
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "support/lyxlib.h"
-
-namespace lyx {
-namespace support {
-
-// Returns current working directory
-FileName const getcwd()
-{
- return FileName(".");
-}
-
-} // namespace support
-} // namespace lyx
#ifndef LYX_LIB_H
#define LYX_LIB_H
-#include "support/FileName.h"
-
#include <string>
namespace lyx {
namespace support {
-/// get the current working directory
-FileName const getcwd();
-
/// FIXME: some point to this hmm ?
int kill(int pid, int sig);
/// FIXME: same here