MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
path.h
1/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2miniob is licensed under Mulan PSL v2.
3You can use this software according to the terms and conditions of the Mulan PSL v2.
4You may obtain a copy of Mulan PSL v2 at:
5 http://license.coscl.org.cn/MulanPSL2
6THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9See the Mulan PSL v2 for more details. */
10
11//
12// Created by Longda on 2021/3/27.
13//
14
15#pragma once
16
17#include "common/lang/string.h"
18
19namespace common {
20
30string getFileName(const string &fullPath);
31void getFileName(const char *path, string &fileName);
32
41string getFilePath(const string &fullPath);
42void getDirName(const char *path, string &parent);
43
49string getAboslutPath(const char *path);
50
54bool is_directory(const char *path);
55
61bool check_directory(string &path);
62
68int list_file(const char *path, const char *filter_pattern, vector<string> &files); // io/io.h::getFileList
69
70} // namespace common