chromium/base/files/file.cc

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

#include "base/files/file.h"

#include <utility>

#include "base/check_op.h"
#include "base/files/file_path.h"
#include "base/files/file_tracing.h"
#include "base/metrics/histogram.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/timer/elapsed_timer.h"
#include "base/trace_event/base_tracing.h"
#include "build/build_config.h"

#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#include <errno.h>
#endif

namespace base {

File::Info::Info() = default;

File::Info::~Info() = default;

File::File() = default;

#if !BUILDFLAG(IS_NACL)
File::File(const FilePath& path, uint32_t flags) :{}
#endif

File::File(ScopedPlatformFile platform_file)
    :{}

File::File(PlatformFile platform_file) :{}

File::File(ScopedPlatformFile platform_file, bool async)
    :{}

File::File(PlatformFile platform_file, bool async)
    :{}

File::File(Error error_details) :{}

File::File(File&& other)
    :{}

File::~File() {}

File& File::operator=(File&& other) {}

#if !BUILDFLAG(IS_NACL)
void File::Initialize(const FilePath& path, uint32_t flags) {}
#endif

std::optional<size_t> File::Read(int64_t offset, span<uint8_t> data) {}

bool File::ReadAndCheck(int64_t offset, span<uint8_t> data) {}

std::optional<size_t> File::ReadAtCurrentPos(span<uint8_t> data) {}

bool File::ReadAtCurrentPosAndCheck(span<uint8_t> data) {}

std::optional<size_t> File::Write(int64_t offset, span<const uint8_t> data) {}

bool File::WriteAndCheck(int64_t offset, span<const uint8_t> data) {}

std::optional<size_t> File::WriteAtCurrentPos(span<const uint8_t> data) {}

bool File::WriteAtCurrentPosAndCheck(span<const uint8_t> data) {}

// static
std::string File::ErrorToString(Error error) {}

void File::WriteIntoTrace(perfetto::TracedValue context) const {}

}  // namespace base