1// Copyright (c) 2014 The LevelDB 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. See the AUTHORS file for names of contributors.
4
5#ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
6#define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
7
8#include <string>
9
10#include "leveldb/env.h"
11#include "leveldb/export.h"
12#include "leveldb/status.h"
13
14namespace leveldb {
15
16// Dump the contents of the file named by fname in text format to
17// *dst. Makes a sequence of dst->Append() calls; each call is passed
18// the newline-terminated text corresponding to a single item found
19// in the file.
20//
21// Returns a non-OK result if fname does not name a leveldb storage
22// file, or if the file cannot be read.
23LEVELDB_EXPORT Status DumpFile(Env* env, const std::string& fname,
24 WritableFile* dst);
25
26} // namespace leveldb
27
28#endif // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
29