dumpfile.h 951 B

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