3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * This file is part of LyX, the document processor.
9 * Licence details can be found in the file COPYING.
15 #include "support/filetools.h"
23 : save_abs_path_(true)
27 void FileName::set(string const & name, string const & buffer_path)
29 save_abs_path_ = AbsolutePath(name);
30 name_ = save_abs_path_ ? name : MakeAbsPath(name, buffer_path);
34 void FileName::erase()
40 string const FileName::relFilename(string const & path) const
42 return MakeRelPath(name_, path);
46 string const FileName::outputFilename(string const & buffer_path) const
48 return save_abs_path_ ? name_ : MakeRelPath(name_, buffer_path);
52 bool operator==(FileName const & lhs, FileName const & rhs)
54 return lhs.absFilename() == rhs.absFilename() &&
55 lhs.saveAbsPath() == rhs.saveAbsPath();
59 bool operator!=(FileName const & lhs, FileName const & rhs)