diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 2fbef702a4..9eabc12967 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -91,6 +91,7 @@ #include "support/Path.h" #include "support/textutils.h" #include "support/types.h" +#include "support/FileZipListDir.h" #if !defined (HAVE_FORK) # define fork() -1 diff --git a/src/Converter.cpp b/src/Converter.cpp index fc82114308..e6f67460fe 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -33,6 +33,7 @@ #include "support/Package.h" #include "support/Path.h" #include "support/Systemcall.h" +#include "support/FileZipListDir.h" using std::find_if; using std::string; diff --git a/src/EmbeddedFiles.cpp b/src/EmbeddedFiles.cpp index e5d56e2437..5ef9da5792 100644 --- a/src/EmbeddedFiles.cpp +++ b/src/EmbeddedFiles.cpp @@ -32,6 +32,7 @@ #include "support/convert.h" #include "support/lyxlib.h" #include "support/lstrings.h" +#include "support/FileZipListDir.h" #include #include diff --git a/src/support/FileZipListDir.h b/src/support/FileZipListDir.h new file mode 100644 index 0000000000..d49e0500ce --- /dev/null +++ b/src/support/FileZipListDir.h @@ -0,0 +1,42 @@ +// -*- C++ -*- +/** + * \file FileZipDir.h + * 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. + */ + +#ifndef LYX_FILEZIPDIR_H +#define LYX_FILEZIPDIR_H + +#include "support/docstring.h" +#include "support/filetools.h" + +#include +#include +#include + +namespace lyx { +namespace support { + +/// \return list other files in the directory having optional extension 'ext'. +std::vector dirList(FileName const & filename, std::string const & ext); + + +} // namespace support +} // namespace lyx + +/// The following functions are implemented in minizip/zipunzip.cpp, and are not in +/// the lyx::support namespace + +/// zip several files to a zipfile. In-zip filenames are also specified +bool zipFiles(std::string const & zipfile, std::vector > const & files); + +/// Unzip a zip file to a directory +bool unzipToDir(std::string const & zipfile, std::string const & path); + + +#endif diff --git a/src/support/filetools.h b/src/support/filetools.h index dce6e6979d..2ea500a8aa 100644 --- a/src/support/filetools.h +++ b/src/support/filetools.h @@ -15,7 +15,6 @@ #include "support/docstring.h" #include "support/FileName.h" -#include #include #include @@ -275,21 +274,10 @@ typedef std::pair cmd_ret; cmd_ret const runCommand(std::string const & cmd); -/// \return list other files in the directory having optional extension 'ext'. -std::vector dirList(FileName const & filename, std::string const & ext); - } // namespace support } // namespace lyx -/// The following functions are implemented in minizip/zipunzip.cpp, and are not in -/// the lyx::support namespace - -/// zip several files to a zipfile. In-zip filenames are also specified -bool zipFiles(std::string const & zipfile, std::vector > const & files); - -/// Unzip a zip file to a directory -bool unzipToDir(std::string const & zipfile, std::string const & path); #endif