chromium/storage/browser/file_system/dump_file_system.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// A tool to dump HTML5 filesystem from CUI.
//
// Usage:
//
// ./out/Release/dump_file_system [options] <filesystem dir> [origin]...
//
// If no origin is specified, this dumps all origins in the profile dir.
//
// Available options:
//
// -t : dumps temporary files instead of persistent.
// -s : dumps syncable files instead of persistent.
// -l : more information will be displayed.
//
// The format of -l option is:
//
// === ORIGIN origin_name origin_dir ===
// file_name file_id file_size file_content_path
// ...
//
// where file_name has a trailing slash, file_size is the number of
// children, and file_content_path is empty if the file is a directory.
//

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

#include <string>
#include <utility>
#include <vector>

#include "base/containers/stack.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "storage/browser/file_system/obfuscated_file_util.h"
#include "storage/browser/file_system/sandbox_directory_database.h"
#include "storage/browser/file_system/sandbox_file_system_backend.h"
#include "storage/browser/file_system/sandbox_origin_database.h"
#include "storage/common/file_system/file_system_types.h"
#include "storage/common/file_system/file_system_util.h"

namespace {

bool g_opt_long;
const base::FilePath::CharType* g_opt_fs_type =);

void ShowMessageAndExit(const std::string& msg) {}

void ShowUsageAndExit(const std::string& arg0) {}

}  // namespace

namespace storage {

static void DumpDirectoryTree(const std::string& origin_name,
                              base::FilePath origin_dir) {}

static base::FilePath GetOriginDir(const base::FilePath& file_system_dir,
                                   const std::string& origin_name) {}

static void DumpOrigin(const base::FilePath& file_system_dir,
                       const std::string& origin_name) {}

static void DumpFileSystem(const base::FilePath& file_system_dir) {}

}  // namespace storage

int main(int argc, char* argv[]) {}