/Users/deen/code/yugabyte-db/src/yb/util/path_util.h
Line | Count | Source |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | // |
18 | | // The following only applies to changes made to this file as part of YugaByte development. |
19 | | // |
20 | | // Portions Copyright (c) YugaByte, Inc. |
21 | | // |
22 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
23 | | // in compliance with the License. You may obtain a copy of the License at |
24 | | // |
25 | | // http://www.apache.org/licenses/LICENSE-2.0 |
26 | | // |
27 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
28 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
29 | | // or implied. See the License for the specific language governing permissions and limitations |
30 | | // under the License. |
31 | | // |
32 | | // Utility methods for dealing with file paths. |
33 | | #ifndef YB_UTIL_PATH_UTIL_H |
34 | | #define YB_UTIL_PATH_UTIL_H |
35 | | |
36 | | #include <string> |
37 | | |
38 | | #include "yb/util/status_fwd.h" |
39 | | |
40 | | namespace yb { |
41 | | |
42 | | class Env; |
43 | | |
44 | | // Appends path segments with the appropriate path separator, if necessary. |
45 | | void AppendPathSegments(std::string* out, const std::string &b); |
46 | | |
47 | | template <class... Args> |
48 | 274k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { |
49 | 274k | AppendPathSegments(out, a); |
50 | 274k | AppendPathSegments(out, std::forward<Args>(args)...); |
51 | 274k | } _ZN2yb18AppendPathSegmentsIJRA8_KcS3_RA5_S1_S3_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEEvPSC_RKSC_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJRA8_KcRA5_S1_S3_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEEvPSC_RKSC_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJRA5_KcRA8_S1_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEEvPSC_RKSC_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJRA8_KcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEvPSA_RKSA_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_EEEvPS7_RKS7_DpOT_ Line | Count | Source | 48 | 8 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 8 | AppendPathSegments(out, a); | 50 | 8 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 8 | } |
_ZN2yb18AppendPathSegmentsIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEvPS7_RKS7_DpOT_ Line | Count | Source | 48 | 9 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 9 | AppendPathSegments(out, a); | 50 | 9 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 9 | } |
_ZN2yb18AppendPathSegmentsIJRA8_KcS3_RA5_S1_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEEvPSC_RKSC_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJRA8_KcRA5_S1_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEEvPSC_RKSC_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
_ZN2yb18AppendPathSegmentsIJRA5_KcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESA_EEEvPSA_RKSA_DpOT_ Line | Count | Source | 48 | 4 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 4 | AppendPathSegments(out, a); | 50 | 4 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 4 | } |
Unexecuted instantiation: _ZN2yb18AppendPathSegmentsIJRA6_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ _ZN2yb18AppendPathSegmentsIJRA8_KcRA12_S1_EEEvPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Line | Count | Source | 48 | 100 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 100 | AppendPathSegments(out, a); | 50 | 100 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 100 | } |
_ZN2yb18AppendPathSegmentsIJRA12_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 48 | 100 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 100 | AppendPathSegments(out, a); | 50 | 100 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 100 | } |
Unexecuted instantiation: _ZN2yb18AppendPathSegmentsIJRA15_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ _ZN2yb18AppendPathSegmentsIJRPKcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 48 | 1.74k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 1.74k | AppendPathSegments(out, a); | 50 | 1.74k | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 1.74k | } |
_ZN2yb18AppendPathSegmentsIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEvPS7_S9_DpOT_ Line | Count | Source | 48 | 178k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 178k | AppendPathSegments(out, a); | 50 | 178k | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 178k | } |
_ZN2yb18AppendPathSegmentsIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_EEEvPS7_S9_DpOT_ Line | Count | Source | 48 | 88.8k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 88.8k | AppendPathSegments(out, a); | 50 | 88.8k | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 88.8k | } |
_ZN2yb18AppendPathSegmentsIJRA9_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 48 | 1.81k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 1.81k | AppendPathSegments(out, a); | 50 | 1.81k | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 1.81k | } |
_ZN2yb18AppendPathSegmentsIJRA4_KcRA14_S1_EEEvPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Line | Count | Source | 48 | 904 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 904 | AppendPathSegments(out, a); | 50 | 904 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 904 | } |
_ZN2yb18AppendPathSegmentsIJRA14_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 48 | 904 | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 904 | AppendPathSegments(out, a); | 50 | 904 | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 904 | } |
_ZN2yb18AppendPathSegmentsIJRA7_KcEEEvPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 48 | 1.81k | void AppendPathSegments(std::string* out, const std::string& a, Args&&... args) { | 49 | 1.81k | AppendPathSegments(out, a); | 50 | 1.81k | AppendPathSegments(out, std::forward<Args>(args)...); | 51 | 1.81k | } |
|
52 | | |
53 | | template <class... Args> |
54 | 10.7M | std::string JoinPathSegments(const std::string& a, Args&&... args) { |
55 | 10.7M | std::string result = a; |
56 | 10.7M | AppendPathSegments(&result, std::forward<Args>(args)...); |
57 | 10.7M | return result; |
58 | 10.7M | } _ZN2yb16JoinPathSegmentsIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_RKS7_DpOT_ Line | Count | Source | 54 | 119k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 119k | std::string result = a; | 56 | 119k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 119k | return result; | 58 | 119k | } |
_ZN2yb16JoinPathSegmentsIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_S9_DpOT_ Line | Count | Source | 54 | 4.91M | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 4.91M | std::string result = a; | 56 | 4.91M | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 4.91M | return result; | 58 | 4.91M | } |
_ZN2yb16JoinPathSegmentsIJRPKcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 248k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 248k | std::string result = a; | 56 | 248k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 248k | return result; | 58 | 248k | } |
_ZN2yb16JoinPathSegmentsIJRA8_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 2.86M | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 2.86M | std::string result = a; | 56 | 2.86M | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 2.86M | return result; | 58 | 2.86M | } |
_ZN2yb16JoinPathSegmentsIJRA15_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 1.31M | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1.31M | std::string result = a; | 56 | 1.31M | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1.31M | return result; | 58 | 1.31M | } |
_ZN2yb16JoinPathSegmentsIJRA17_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 1 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1 | std::string result = a; | 56 | 1 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1 | return result; | 58 | 1 | } |
_ZN2yb16JoinPathSegmentsIJRA10_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 6 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 6 | std::string result = a; | 56 | 6 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 6 | return result; | 58 | 6 | } |
_ZN2yb16JoinPathSegmentsIJRA5_KcRA8_S1_S5_S3_S5_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEESC_RKSC_DpOT_ Line | Count | Source | 54 | 4 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 4 | std::string result = a; | 56 | 4 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 4 | return result; | 58 | 4 | } |
_ZN2yb16JoinPathSegmentsIJRA5_KcRA8_S1_S5_S3_NSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESC_EEESC_RKSC_DpOT_ Line | Count | Source | 54 | 4 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 4 | std::string result = a; | 56 | 4 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 4 | return result; | 58 | 4 | } |
Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA11_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ _ZN2yb16JoinPathSegmentsIJRA5_KcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEESA_RKSA_DpOT_ Line | Count | Source | 54 | 1 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1 | std::string result = a; | 56 | 1 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1 | return result; | 58 | 1 | } |
_ZN2yb16JoinPathSegmentsIJRA5_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 1.07k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1.07k | std::string result = a; | 56 | 1.07k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1.07k | return result; | 58 | 1.07k | } |
_ZN2yb16JoinPathSegmentsIJRA7_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 75 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 75 | std::string result = a; | 56 | 75 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 75 | return result; | 58 | 75 | } |
_ZN2yb16JoinPathSegmentsIJRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_RKS7_DpOT_ Line | Count | Source | 54 | 98.5k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 98.5k | std::string result = a; | 56 | 98.5k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 98.5k | return result; | 58 | 98.5k | } |
Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA11_KcRA6_S1_EEENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ _ZN2yb16JoinPathSegmentsIJRA8_KcS3_RA12_S1_EEENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Line | Count | Source | 54 | 100 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 100 | std::string result = a; | 56 | 100 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 100 | return result; | 58 | 100 | } |
Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA29_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA8_KcRA15_S1_EEENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA22_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJRA31_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ _ZN2yb16JoinPathSegmentsIJRA14_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 904 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 904 | std::string result = a; | 56 | 904 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 904 | return result; | 58 | 904 | } |
_ZN2yb16JoinPathSegmentsIJRA16_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 908 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 908 | std::string result = a; | 56 | 908 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 908 | return result; | 58 | 908 | } |
_ZN2yb16JoinPathSegmentsIJRA6_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 907 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 907 | std::string result = a; | 56 | 907 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 907 | return result; | 58 | 907 | } |
_ZN2yb16JoinPathSegmentsIJRA4_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 4.71k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 4.71k | std::string result = a; | 56 | 4.71k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 4.71k | return result; | 58 | 4.71k | } |
_ZN2yb16JoinPathSegmentsIJRPKcS3_EEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 1.74k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1.74k | std::string result = a; | 56 | 1.74k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1.74k | return result; | 58 | 1.74k | } |
Unexecuted instantiation: _ZN2yb16JoinPathSegmentsIJKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_RS8_DpOT_ _ZN2yb16JoinPathSegmentsIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_EEES7_S9_DpOT_ Line | Count | Source | 54 | 89.4k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 89.4k | std::string result = a; | 56 | 89.4k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 89.4k | return result; | 58 | 89.4k | } |
_ZN2yb16JoinPathSegmentsIJRPKcRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_EEESA_SC_DpOT_ Line | Count | Source | 54 | 88.8k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 88.8k | std::string result = a; | 56 | 88.8k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 88.8k | return result; | 58 | 88.8k | } |
_ZN2yb16JoinPathSegmentsIJRA12_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 952k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 952k | std::string result = a; | 56 | 952k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 952k | return result; | 58 | 952k | } |
_ZN2yb16JoinPathSegmentsIJRA9_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 46.9k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 46.9k | std::string result = a; | 56 | 46.9k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 46.9k | return result; | 58 | 46.9k | } |
_ZN2yb16JoinPathSegmentsIJRA13_KcEEENSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKSA_DpOT_ Line | Count | Source | 54 | 904 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 904 | std::string result = a; | 56 | 904 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 904 | return result; | 58 | 904 | } |
_ZN2yb16JoinPathSegmentsIJRA4_KcRA9_S1_EEENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Line | Count | Source | 54 | 1.81k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1.81k | std::string result = a; | 56 | 1.81k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1.81k | return result; | 58 | 1.81k | } |
_ZN2yb16JoinPathSegmentsIJRA3_KcRA4_S1_RA14_S1_EEENSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKSE_DpOT_ Line | Count | Source | 54 | 904 | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 904 | std::string result = a; | 56 | 904 | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 904 | return result; | 58 | 904 | } |
_ZN2yb16JoinPathSegmentsIJRA4_KcRA7_S1_EEENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKSC_DpOT_ Line | Count | Source | 54 | 1.81k | std::string JoinPathSegments(const std::string& a, Args&&... args) { | 55 | 1.81k | std::string result = a; | 56 | 1.81k | AppendPathSegments(&result, std::forward<Args>(args)...); | 57 | 1.81k | return result; | 58 | 1.81k | } |
|
59 | | |
60 | | // Return the enclosing directory of path. |
61 | | // This is like dirname(3) but for C++ strings. |
62 | | std::string DirName(const std::string& path); |
63 | | |
64 | | // Return the terminal component of a path. |
65 | | // This is like basename(3) but for C++ strings. |
66 | | std::string BaseName(const std::string& path); |
67 | | |
68 | | // We ask the user to specify just a set of top level dirs where we can place data. However, |
69 | | // under those, we create our own structure, which includes one level worth of generic suffix |
70 | | // and another level under that splitting by server type (master vs tserver). |
71 | | std::string GetYbDataPath(const std::string& root); |
72 | | std::string GetServerTypeDataPath(const std::string& root, const std::string& server_type); |
73 | | |
74 | | // For the user specified root dirs, setup the two level hierarchy below it and report the final |
75 | | // path as well as whether we created the final path or not. |
76 | | Status SetupRootDir( |
77 | | Env* env, const std::string& root, const std::string& server_type, std::string* out_dir, |
78 | | bool* created); |
79 | | |
80 | | // Tests whether a given path allows creation of temporary files with O_DIRECT given a |
81 | | // environment variable. |
82 | | Status CheckODirectTempFileCreationInDir(Env* env, const std::string& dir_path); |
83 | | |
84 | | } // namespace yb |
85 | | #endif /* YB_UTIL_PATH_UTIL_H */ |