| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_ZIP_H_ | 5 #ifndef CHROME_COMMON_ZIP_H_ |
| 6 #define CHROME_COMMON_ZIP_H_ | 6 #define CHROME_COMMON_ZIP_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 | 11 |
| 12 // Zip the contents of src_dir into dest_file. src_path must be a directory. | 12 // Zip the contents of src_dir into dest_file. src_path must be a directory. |
| 13 // An entry will *not* be created in the zip for the root folder -- children | 13 // An entry will *not* be created in the zip for the root folder -- children |
| 14 // of src_dir will be at the root level of the created zip. | 14 // of src_dir will be at the root level of the created zip. |
| 15 bool Zip(const FilePath& src_dir, const FilePath& dest_file); | 15 // If |include_hidden_files| is true, files starting with "." are included. |
| 16 // Otherwise they are omitted. |
| 17 bool Zip(const FilePath& src_dir, const FilePath& dest_file, |
| 18 bool include_hidden_files); |
| 16 | 19 |
| 17 // Unzip the contents of zip_file into dest_dir. | 20 // Unzip the contents of zip_file into dest_dir. |
| 18 bool Unzip(const FilePath& zip_file, const FilePath& dest_dir); | 21 bool Unzip(const FilePath& zip_file, const FilePath& dest_dir); |
| 19 | 22 |
| 20 #endif // CHROME_COMMON_ZIP_H_ | 23 #endif // CHROME_COMMON_ZIP_H_ |
| OLD | NEW |