]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/util/file_util.h
import 14.2.4 nautilus point release
[ceph.git] / ceph / src / rocksdb / util / file_util.h
CommitLineData
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
9#include "options/db_options.h"
10#include "rocksdb/env.h"
11#include "rocksdb/status.h"
12#include "rocksdb/types.h"
494da23a 13#include "util/filename.h"
7c673cae
FG
14
15namespace rocksdb {
16// use_fsync maps to options.use_fsync, which determines the way that
17// the file is synced after copying.
18extern Status CopyFile(Env* env, const std::string& source,
19 const std::string& destination, uint64_t size,
20 bool use_fsync);
21
22extern Status CreateFile(Env* env, const std::string& destination,
11fdf7f2 23 const std::string& contents, bool use_fsync);
7c673cae 24
494da23a
TL
25extern Status DeleteDBFile(const ImmutableDBOptions* db_options,
26 const std::string& fname,
27 const std::string& path_to_sync,
28 const bool force_bg = false);
7c673cae
FG
29
30} // namespace rocksdb