diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-01 02:53:00 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-01 02:53:00 +0000 |
commit | 4777bc566e7931c891c4fa16261f04ed940ec9d5 (patch) | |
tree | 400f33237743c863f4c95883b014ea4890141df2 /chrome/common/zip.h | |
parent | 08ff58c867a17b9fe7dd6988d1eac83cb3b06df0 (diff) | |
download | chromium_src-4777bc566e7931c891c4fa16261f04ed940ec9d5.zip chromium_src-4777bc566e7931c891c4fa16261f04ed940ec9d5.tar.gz chromium_src-4777bc566e7931c891c4fa16261f04ed940ec9d5.tar.bz2 |
Implements a Zip() utility function. Refactor existing
Unzip-relatedness into shared locations.
Review URL: http://codereview.chromium.org/118028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/zip.h')
-rw-r--r-- | chrome/common/zip.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/common/zip.h b/chrome/common/zip.h new file mode 100644 index 0000000..23823d8 --- /dev/null +++ b/chrome/common/zip.h @@ -0,0 +1,20 @@ +// 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_dir into dest_file. src_path must be a directory. +// An entry will *not* be created in the zip for the root folder -- children +// of src_dir will be at the root level of the created zip. +bool Zip(const FilePath& src_dir, const FilePath& dest_file); + +// Unzip the contents of zip_file into dest_dir. +bool Unzip(const FilePath& zip_file, const FilePath& dest_dir); + +#endif // CHROME_COMMON_ZIP_H_ |