Skip to content

Commit 513832c

Browse files
committed
Added File_WriteAllText article
1 parent 032e38b commit 513832c

2 files changed

Lines changed: 22 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_WriteAllText
2+
3+
`File_WriteAllText` Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
4+
5+
```csharp
6+
File_WriteAllText
7+
@path NVARCHAR (MAX),
8+
@contents NVARCHAR (MAX)
9+
```
10+
11+
## Parameters
12+
13+
- **path**: The file to write to.
14+
- **contents**: The string to write to the file.
15+
16+
## Example
17+
18+
```csharp
19+
EXEC File_WriteAllText @path = 'C:\Temp\MyTest.txt', @contents = 'This is a text'
20+
```
21+

docs2/pages/documentations/file/file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ Provides methods for the creation, copying, deletion, moving, and opening of a s
2626
| [File_SetLastAccessTimeUtc(path, lastAccessTime)](/file-set-last-access-time-utc) | Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed. | [Try it]()|
2727
| [File_SetLastWriteTime(path, lastWriteTime)](/file-set-last-write-time) | Sets the date and time that the specified file was last written to. | [Try it]()|
2828
| [File_SetLastWriteTimeUtc(path, lastWriteTime)](/file-set-last-write-time-utc) | Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to. | [Try it]()|
29+
| [File_WriteAllText(path, contents)](/file-write-all-text) | Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten. | [Try it]()|

0 commit comments

Comments
 (0)