Skip to content

Commit 47fd1f4

Browse files
committed
Added Path_GetExtension and Path_GetFileName article
1 parent 793c90f commit 47fd1f4

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Path_GetExtension
2+
3+
`Path_GetExtension` returns the extension of the specified path string.
4+
5+
```csharp
6+
Path_GetExtension (
7+
@path NVARCHAR (4000)
8+
)
9+
RETURNS NVARCHAR (4000)
10+
```
11+
12+
## Parameters
13+
14+
- **path**: The path string from which to get the extension.
15+
16+
## Returns
17+
18+
The extension of the specified path (including the period "."), or null, or empty string. If `path` is null, it returns null. If path does not have extension information, it returns empty string.
19+
20+
## Example
21+
22+
```csharp
23+
SELECT SQLNET::Path_GetExtension('C:\Temp\MyTest.txt')
24+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Path_GetFileName
2+
3+
`Path_GetFileName` returns the file name and extension of the specified path string.
4+
5+
```csharp
6+
Path_GetFileName (
7+
@path NVARCHAR (4000)
8+
)
9+
RETURNS NVARCHAR (4000)
10+
```
11+
12+
## Parameters
13+
14+
- **path**: The path string from which to obtain the file name and extension.
15+
16+
## Returns
17+
18+
The characters after the last directory character in `path`. If the last character of `path` is a directory or volume separator character, this method returns empty string. If `path` is `null`, this method returns `null`.
19+
20+
## Example
21+
22+
```csharp
23+
SELECT SQLNET::Path_GetFileName('C:\Temp\MyTest.txt')
24+
```

docs2/pages/documentations/path/path.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ Performs operations on string instances that contain file or directory path info
77
| [Path_ChangeExtension(path, extension)](/path-change-extension) | Changes the extension of a path string. | [Try it]()|
88
| [Path_Combine(path1, path2)](/path-combine) | Combines two strings into a path. | [Try it]()|
99
| [Path_GetDirectoryName(path)](/path-get-directory-name) | Returns the directory information for the specified path string. | [Try it]()|
10+
| [Path_GetExtension(path)](/path-get-extension) | Returns the extension of the specified path string. | [Try it]()|
11+
| [Path_GetFileName(path)](/path-get-file-name) | Returns the file name and extension of the specified path string. | [Try it]()|

0 commit comments

Comments
 (0)