1 //  Copyright (c) 2011-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 //
6 // Copyright (c) 2012 Facebook.
7 // Use of this source code is governed by a BSD-style license that can be
8 // found in the LICENSE file.
9 
10 #include "rocksdb/utilities/info_log_finder.h"
11 #include "file/filename.h"
12 #include "rocksdb/env.h"
13 
14 namespace ROCKSDB_NAMESPACE {
15 
GetInfoLogList(DB * db,std::vector<std::string> * info_log_list)16 Status GetInfoLogList(DB* db, std::vector<std::string>* info_log_list) {
17   if (!db) {
18     return Status::InvalidArgument("DB pointer is not valid");
19   }
20   std::string parent_path;
21   const Options& options = db->GetOptions();
22   return GetInfoLogFiles(options.env, options.db_log_dir, db->GetName(),
23                          &parent_path, info_log_list);
24 }
25 }  // namespace ROCKSDB_NAMESPACE
26