Skip to content

Commit b928a99

Browse files
committed
Added File_Move and File_ReadAllText article
1 parent 7ac01a4 commit b928a99

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File_Move
2+
3+
`File_Move` moves a specified file to a new location, providing the option to specify a new file name.
4+
5+
```csharp
6+
File_Move
7+
@sourceFileName NVARCHAR (MAX),
8+
@destFileName NVARCHAR (MAX)
9+
```
10+
11+
## Parameters
12+
13+
- **sourceFileName**: The name of the file to move.
14+
- **destFileName**: The new path and name for the file.
15+
16+
## Example
17+
18+
```csharp
19+
EXEC File_Move @sourceFileName = 'C:\Temp\MyTest.txt', @destFileName = 'C:\Temp\MyTest.txt'
20+
```
21+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# File_ReadAllText
2+
3+
`File_ReadAllText` 0pens a text file, reads and returns all the text in the file, and then closes the file.
4+
5+
```csharp
6+
File_ReadAllText (
7+
@path NVARCHAR (MAX))
8+
RETURNS NVARCHAR (MAX)
9+
```
10+
11+
## Parameters
12+
13+
- **path**: The file path to open for reading.
14+
15+
## Returns
16+
17+
A string containing all the text in the file.
18+
19+
## Example
20+
21+
```csharp
22+
SELECT SQLNET::File_ReadAllText('C:\Temp\MyTest.txt')
23+
```
24+

docs2/pages/documentations/file/file.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ Provides methods for the creation, copying, deletion, moving, and opening of a s
1717
| [File_GetLastWriteTime(path)](/file-get-last-write-time) | Returns the date and time the specified file or directory was last written to. | [Try it]()|
1818
| [File_GetLastWriteTimeUtc(path)](/file-get-last-write-time-utc) | Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to. | [Try it]()|
1919
| [File_IsExists(path)](/file-isexists) | Determines whether the specified file exists. | [Try it]()|
20+
| [File_Move(sourceFileName, destFileName)](/file-move) | Moves a specified file to a new location, providing the option to specify a new file name. | [Try it]()|
21+
| [File_ReadAllText(path)](/file-move) | Opens a text file, reads and returns all the text in the file, and then closes the file. | [Try it]()|

0 commit comments

Comments
 (0)