blob: 7c915742b20a795df41d769d3bef64d4774b3433 [file] [log] [blame]
license.botbf09a502008-08-24 00:55:551// Copyright (c) 2006-2008 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.
[email protected]408d35f52008-08-13 18:30:224
5#ifndef NET_DISK_CACHE_CACHE_UTIL_H_
6#define NET_DISK_CACHE_CACHE_UTIL_H_
7
8#include <string>
9
10#include "base/basictypes.h"
11
[email protected]cfaa1f22009-10-12 17:14:5912class FilePath;
13
[email protected]408d35f52008-08-13 18:30:2214namespace disk_cache {
15
[email protected]408d35f52008-08-13 18:30:2216// Moves the cache files from the given path to another location.
17// Returns true if successful, false otherwise.
[email protected]cfaa1f22009-10-12 17:14:5918bool MoveCache(const FilePath& from_path, const FilePath& to_path);
[email protected]408d35f52008-08-13 18:30:2219
20// Deletes the cache files stored on |path|, and optionally also attempts to
21// delete the folder itself.
[email protected]cfaa1f22009-10-12 17:14:5922void DeleteCache(const FilePath& path, bool remove_folder);
23// Deprecated.
[email protected]408d35f52008-08-13 18:30:2224void DeleteCache(const std::wstring& path, bool remove_folder);
25
[email protected]a88d601f2008-08-15 20:36:2126// Deletes a cache file.
[email protected]cfaa1f22009-10-12 17:14:5927bool DeleteCacheFile(const FilePath& name);
28// Deprecated.
[email protected]a88d601f2008-08-15 20:36:2129bool DeleteCacheFile(const std::wstring& name);
30
[email protected]408d35f52008-08-13 18:30:2231} // namespace disk_cache
32
33#endif // NET_DISK_CACHE_CACHE_UTIL_H_