Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.md « path « path « tpl « functions « reference « documentation « en « content « exampleSite - github.com/gohugoio/gohugoioTheme2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d11a905271ca23a09c2bf3577795873f07e0da3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154





---
title: "path"
linkTitle: "path"
description: "Path is Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. "
hugoSymbol: TODO




---















## path.Base {#path_namespace_base}

\([any](/documentation/reference/gotypes/#any)\) → [string](/documentation/reference/gotypes/#string)
{.funcsig}
Base returns the last element of path.
Trailing slashes are removed before extracting the last element.
If the path is empty, Base returns ".".
If the path consists entirely of slashes, Base returns "/".
The input path is passed into filepath.ToSlash converting any Windows slashes
to forward slashes.


{{< docs/func-aliases "path.Base" >}}
{{< docs/func-examples "path.Base" >}}







## path.Clean {#path_namespace_clean}

\([any](/documentation/reference/gotypes/#any)\) → [string](/documentation/reference/gotypes/#string)
{.funcsig}
Clean replaces the separators used with standard slashes and then
extraneous slashes are removed.


{{< docs/func-aliases "path.Clean" >}}
{{< docs/func-examples "path.Clean" >}}







## path.Dir {#path_namespace_dir}

\([any](/documentation/reference/gotypes/#any)\) → [string](/documentation/reference/gotypes/#string)
{.funcsig}
Dir returns all but the last element of path, typically the path's directory.
After dropping the final element using Split, the path is Cleaned and trailing
slashes are removed.
If the path is empty, Dir returns ".".
If the path consists entirely of slashes followed by non-slash bytes, Dir
returns a single slash. In any other case, the returned path does not end in a
slash.
The input path is passed into filepath.ToSlash converting any Windows slashes
to forward slashes.


{{< docs/func-aliases "path.Dir" >}}
{{< docs/func-examples "path.Dir" >}}







## path.Ext {#path_namespace_ext}

\([any](/documentation/reference/gotypes/#any)\) → [string](/documentation/reference/gotypes/#string)
{.funcsig}
Ext returns the file name extension used by path.
The extension is the suffix beginning at the final dot
in the final slash-separated element of path;
it is empty if there is no dot.
The input path is passed into filepath.ToSlash converting any Windows slashes
to forward slashes.


{{< docs/func-aliases "path.Ext" >}}
{{< docs/func-examples "path.Ext" >}}







## path.Join {#path_namespace_join}

\([...any](/documentation/reference/objects//...any)\) → [string](/documentation/reference/gotypes/#string)
{.funcsig}
Join joins any number of path elements into a single path, adding a
separating slash if necessary. All the input
path elements are passed into filepath.ToSlash converting any Windows slashes
to forward slashes.
The result is Cleaned; in particular,
all empty strings are ignored.


{{< docs/func-aliases "path.Join" >}}
{{< docs/func-examples "path.Join" >}}







## path.Split {#path_namespace_split}

\([any](/documentation/reference/gotypes/#any)\) → [DirFile](/documentation/reference/objects//dirfile)
{.funcsig}
Split splits path immediately following the final slash,
separating it into a directory and file name component.
If there is no slash in path, Split returns an empty dir and
file set to path.
The input path is passed into filepath.ToSlash converting any Windows slashes
to forward slashes.
The returned values have the property that path = dir+file.


{{< docs/func-aliases "path.Split" >}}
{{< docs/func-examples "path.Split" >}}