]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
Add quote style information to languages
[lyx.git] / src / support / FileName.cpp
index 759304ef80f7db2269c90996f9aab8336591847b..5d05b13a7e1c1bdca65c807edc38ab58e879bf47 100644 (file)
@@ -367,6 +367,19 @@ FileName FileName::onlyPath() const
 }
 
 
+FileName FileName::parentPath() const
+{
+       FileName path;
+       // return empty path for parent of root dir
+       // parent of empty path is empty too
+       if (empty() || d->fi.isRoot())
+               return path;
+       path.d->fi.setFile(d->fi.path());
+       path.d->name = fromqstr(path.d->fi.absoluteFilePath());
+       return path;
+}
+
+
 bool FileName::isReadableFile() const
 {
        return !empty() && d->fi.isFile() && d->fi.isReadable();