]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/util/file_util.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rocksdb / util / file_util.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
5 //
6 #pragma once
7 #include <string>
8
9 #include "options/db_options.h"
10 #include "rocksdb/env.h"
11 #include "rocksdb/status.h"
12 #include "rocksdb/types.h"
13
14 namespace rocksdb {
15 // use_fsync maps to options.use_fsync, which determines the way that
16 // the file is synced after copying.
17 extern Status CopyFile(Env* env, const std::string& source,
18 const std::string& destination, uint64_t size,
19 bool use_fsync);
20
21 extern Status CreateFile(Env* env, const std::string& destination,
22 const std::string& contents);
23
24 extern Status DeleteSSTFile(const ImmutableDBOptions* db_options,
25 const std::string& fname, uint32_t path_id);
26
27 } // namespace rocksdb