]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
11fdf7f2 TL |
2 | // This source code is licensed under both the GPLv2 (found in the |
3 | // COPYING file in the root directory) and Apache 2.0 License | |
4 | // (found in the LICENSE.Apache file in the root directory). | |
7c673cae FG |
5 | // |
6 | #pragma once | |
7 | #include <string> | |
8 | ||
f67539c2 | 9 | #include "file/filename.h" |
7c673cae FG |
10 | #include "options/db_options.h" |
11 | #include "rocksdb/env.h" | |
f67539c2 | 12 | #include "rocksdb/file_system.h" |
7c673cae FG |
13 | #include "rocksdb/status.h" |
14 | #include "rocksdb/types.h" | |
15 | ||
f67539c2 | 16 | namespace ROCKSDB_NAMESPACE { |
7c673cae FG |
17 | // use_fsync maps to options.use_fsync, which determines the way that |
18 | // the file is synced after copying. | |
f67539c2 | 19 | extern Status CopyFile(FileSystem* fs, const std::string& source, |
7c673cae FG |
20 | const std::string& destination, uint64_t size, |
21 | bool use_fsync); | |
22 | ||
f67539c2 | 23 | extern Status CreateFile(FileSystem* fs, const std::string& destination, |
11fdf7f2 | 24 | const std::string& contents, bool use_fsync); |
7c673cae | 25 | |
494da23a TL |
26 | extern Status DeleteDBFile(const ImmutableDBOptions* db_options, |
27 | const std::string& fname, | |
f67539c2 TL |
28 | const std::string& path_to_sync, const bool force_bg, |
29 | const bool force_fg); | |
7c673cae | 30 | |
f67539c2 TL |
31 | extern bool IsWalDirSameAsDBPath(const ImmutableDBOptions* db_options); |
32 | ||
33 | } // namespace ROCKSDB_NAMESPACE |