env_chroot.h 704 B

12345678910111213141516171819202122
  1. // Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
  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).
  5. #pragma once
  6. #if !defined(ROCKSDB_LITE) && !defined(OS_WIN)
  7. #include <string>
  8. #include "rocksdb/env.h"
  9. namespace ROCKSDB_NAMESPACE {
  10. // Returns an Env that translates paths such that the root directory appears to
  11. // be chroot_dir. chroot_dir should refer to an existing directory.
  12. Env* NewChrootEnv(Env* base_env, const std::string& chroot_dir);
  13. } // namespace ROCKSDB_NAMESPACE
  14. #endif // !defined(ROCKSDB_LITE) && !defined(OS_WIN)