Delete FilesystemInterface::DeleteFolderAndContents and related methods.

Additional methods deleted:

  DeleteFolderContents
  IsTemporaryPath
  GetAppTempFolder

Unused since cl https://codereview.webrtc.org/2872283002/

BUG=webrtc:7345,webrtc:6424

Review-Url: https://codereview.webrtc.org/2887093002
Cr-Commit-Position: refs/heads/master@{#18194}
This commit is contained in:
nisse
2017-05-18 05:49:58 -07:00
committed by Commit bot
parent 57efb038bb
commit b243ee91c3
6 changed files with 0 additions and 150 deletions

View File

@ -102,15 +102,6 @@ class FilesystemInterface {
// not be deleted.
virtual bool DeleteEmptyFolder(const Pathname &folder) = 0;
// This will call IterateDirectory, to get a directory iterator, and then
// call DeleteFolderAndContents and DeleteFile on every path contained in this
// folder. If the folder is empty, this returns true.
virtual bool DeleteFolderContents(const Pathname &folder);
// This deletes the contents of a folder, recursively, and then deletes
// the folder itself.
virtual bool DeleteFolderAndContents(const Pathname& folder);
// Creates a directory. This will call itself recursively to create /foo/bar
// even if /foo does not exist. Returns true if the function succeeds.
virtual bool CreateFolder(const Pathname &pathname) = 0;
@ -130,9 +121,6 @@ class FilesystemInterface {
// directory either exists, or is also absent.
virtual bool IsAbsent(const Pathname& pathname) = 0;
// Returns true if pathname represents a temporary location on the system.
virtual bool IsTemporaryPath(const Pathname& pathname) = 0;
// A folder appropriate for storing temporary files (Contents are
// automatically deleted when the program exits)
virtual bool GetTemporaryFolder(Pathname &path, bool create,
@ -148,12 +136,6 @@ class FilesystemInterface {
virtual bool GetFileTime(const Pathname& path, FileTimeType which,
time_t* time) = 0;
// Get a temporary folder that is unique to the current user and application.
// TODO: Re-evaluate the goals of this function. We probably just need any
// directory that won't collide with another existing directory, and which
// will be cleaned up when the program exits.
virtual bool GetAppTempFolder(Pathname* path) = 0;
// Note: These might go into some shared config section later, but they're
// used by some methods in this interface, so we're leaving them here for now.
void SetOrganizationName(const std::string& organization) {
@ -211,14 +193,6 @@ class Filesystem {
return EnsureDefaultFilesystem()->DeleteFile(filename);
}
static bool DeleteFolderContents(const Pathname &folder) {
return EnsureDefaultFilesystem()->DeleteFolderContents(folder);
}
static bool DeleteFolderAndContents(const Pathname &folder) {
return EnsureDefaultFilesystem()->DeleteFolderAndContents(folder);
}
static bool MoveFile(const Pathname &old_path, const Pathname &new_path) {
return EnsureDefaultFilesystem()->MoveFile(old_path, new_path);
}
@ -235,10 +209,6 @@ class Filesystem {
return EnsureDefaultFilesystem()->IsAbsent(pathname);
}
static bool IsTemporaryPath(const Pathname& pathname) {
return EnsureDefaultFilesystem()->IsTemporaryPath(pathname);
}
static bool GetTemporaryFolder(Pathname &path, bool create,
const std::string *append) {
return EnsureDefaultFilesystem()->GetTemporaryFolder(path, create, append);
@ -258,10 +228,6 @@ class Filesystem {
return EnsureDefaultFilesystem()->GetFileTime(path, which, time);
}
static bool GetAppTempFolder(Pathname* path) {
return EnsureDefaultFilesystem()->GetAppTempFolder(path);
}
static void SetOrganizationName(const std::string& organization) {
EnsureDefaultFilesystem()->SetOrganizationName(organization);
}