Chromium Code Reviews| Index: chrome/common/zip.h |
| diff --git a/chrome/common/zip.h b/chrome/common/zip.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d007c43ed0182d8cd47cae42b8c12a578ad6181 |
| --- /dev/null |
| +++ b/chrome/common/zip.h |
| @@ -0,0 +1,23 @@ |
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_COMMON_ZIP_H_ |
| +#define CHROME_COMMON_ZIP_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/file_path.h" |
| + |
| +// Zip the contents of src_path into dest_file. src_path can be a file or |
| +// directory. If it is a directory, it will be zipped recursively. |
|
Erik does not do reviews
2009/05/29 23:33:27
note that on failure a partial zip file may still
|
| +bool Zip(const FilePath& src_path, const FilePath& dest_file); |
| + |
| +// Unzip the contents of zip_file into dest_dir. The complete paths of all |
| +// created files and directories are added to files if it is non-NULL. |
| +// Returns true on success. Does not clean up dest_dir on failure. |
| +// Does not support encrypted or password protected zip files. |
| +bool Unzip(const FilePath& zip_file, const FilePath& dest_dir, |
| + std::vector<FilePath>* files); |
| + |
| +#endif // CHROME_COMMON_ZIP_H_ |