chromium/components/services/storage/public/cpp/filesystem/filesystem_impl.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/services/storage/public/cpp/filesystem/filesystem_impl.h"

#include <set>
#include <vector>

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/files/file.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/synchronization/lock.h"
#include "base/types/expected_macros.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"

#if BUILDFLAG(IS_WIN)
#include <windows.h>
#endif

namespace storage {

namespace {

// Retains a mapping of lock file paths which have been locked by
// |FilesystemImpl::LockFile| and not yet released.
class LockTable {};

// Get the global singleton instance of LockTable. This returned object is
// thread-safe.
LockTable& GetLockTable() {}

class FileLockImpl : public mojom::FileLock {};

}  // namespace

FilesystemImpl::FilesystemImpl(const base::FilePath& root,
                               ClientType client_type)
    :{}

FilesystemImpl::~FilesystemImpl() = default;

void FilesystemImpl::Clone(mojo::PendingReceiver<mojom::Directory> receiver) {}

void FilesystemImpl::PathExists(const base::FilePath& path,
                                PathExistsCallback callback) {}

void FilesystemImpl::GetEntries(const base::FilePath& path,
                                mojom::GetEntriesMode mode,
                                GetEntriesCallback callback) {}

void FilesystemImpl::OpenFile(const base::FilePath& path,
                              mojom::FileOpenMode mode,
                              mojom::FileReadAccess read_access,
                              mojom::FileWriteAccess write_access,
                              OpenFileCallback callback) {}

void FilesystemImpl::CreateDirectory(const base::FilePath& path,
                                     CreateDirectoryCallback callback) {}

void FilesystemImpl::DeleteFile(const base::FilePath& path,
                                DeleteFileCallback callback) {}

void FilesystemImpl::GetFileInfo(const base::FilePath& path,
                                 GetFileInfoCallback callback) {}

void FilesystemImpl::GetPathAccess(const base::FilePath& path,
                                   GetPathAccessCallback callback) {}

void FilesystemImpl::RenameFile(const base::FilePath& old_path,
                                const base::FilePath& new_path,
                                RenameFileCallback callback) {}

void FilesystemImpl::LockFile(const base::FilePath& path,
                              LockFileCallback callback) {}

// static
base::FileErrorOr<base::File> FilesystemImpl::LockFileLocal(
    const base::FilePath& path,
    bool* same_process_failure) {}

// static
void FilesystemImpl::UnlockFileLocal(const base::FilePath& path) {}

// static
mojom::PathAccessInfoPtr FilesystemImpl::GetPathAccessLocal(
    const base::FilePath& path) {}

// static
base::FileErrorOr<std::vector<base::FilePath>>
FilesystemImpl::GetDirectoryEntries(const base::FilePath& path,
                                    mojom::GetEntriesMode mode) {}

base::FilePath FilesystemImpl::MakeAbsolute(const base::FilePath& path) const {}

}  // namespace storage