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