]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/util/file_util.h
build: use dgit for download target
[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"
13
14namespace rocksdb {
15// use_fsync maps to options.use_fsync, which determines the way that
16// the file is synced after copying.
17extern Status CopyFile(Env* env, const std::string& source,
18 const std::string& destination, uint64_t size,
19 bool use_fsync);
20
21extern Status CreateFile(Env* env, const std::string& destination,
11fdf7f2 22 const std::string& contents, bool use_fsync);
7c673cae
FG
23
24extern Status DeleteSSTFile(const ImmutableDBOptions* db_options,
11fdf7f2
TL
25 const std::string& fname,
26 const std::string& path_to_sync);
7c673cae
FG
27
28} // namespace rocksdb