These helpers provide the ability to parse paths.
- Helpers.Path.GetAbsolutePath
- Helpers.Path.GetDirectory
- Helpers.Path.GetExtension
- Helpers.Path.GetFilename
| Summary | Given path, get just the folder paths |
| Returns | Folder paths |
| Remarks | |
| Parameters | |
| path | Path to pull info from |
| delimiter | Delimiter to parse path with, defaults to / |
Context
{
"a": "/first/second/third/somefile.txt",
"b": "first_second_third_somefile.txt"
}Usage
Returns
<strong>result:</strong>
/first/second/third
_first_second_third
/arinet/HandlebarDocs/blob/master| Summary | Given path, get top level directory name |
| Returns | Top level directory name |
| Remarks | |
| Parameters | |
| path | Path to pull info from |
| delimiter | Delimiter to parse path with, defaults to / |
Context
{
"a": "/first/second/third/somefile.txt",
"b": "first_second_third_somefile.txt"
}Usage
Returns
<strong>result:</strong>
third
third
master| Summary | Given path, get file extension |
| Returns | File extension |
| Remarks | |
| Parameters | |
| path | Path to pull info from |
| delimiter | Delimiter to parse path with, defaults to / |
Context
{
"a": "/first/second/third/somefile.txt",
"b": "first_second_third_somefile.txt"
}Usage
Returns
<strong>result:</strong>
.txt
.txt
.md| Summary | Given path, get file name |
| Returns | File name |
| Remarks | |
| Parameters | |
| path | Path to pull info from |
| delimiter | Delimiter to parse path with, defaults to / |
Context
{
"a": "/first/second/third/somefile.txt",
"b": "first_second_third_somefile.txt"
}Usage
Returns
<strong>result:</strong>
somefile.txt
somefile.txt
customHelpers.md