Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteAllLinesAsync() [2/2]

static Task System.IO.File.WriteAllLinesAsync ( string path,
IEnumerable< string > contents,
Encoding encoding,
CancellationToken cancellationToken = default(CancellationToken) )
inlinestatic

Definition at line 881 of file File.cs.

882 {
883 if (path == null)
884 {
885 throw new ArgumentNullException("path");
886 }
887 if (contents == null)
888 {
889 throw new ArgumentNullException("contents");
890 }
891 if (encoding == null)
892 {
893 throw new ArgumentNullException("encoding");
894 }
895 if (path.Length == 0)
896 {
897 throw new ArgumentException(SR.Argument_EmptyPath, "path");
898 }
899 if (!cancellationToken.IsCancellationRequested)
900 {
902 }
904 }
static StreamWriter AsyncStreamWriter(string path, Encoding encoding, bool append)
Definition File.cs:631
static async Task InternalWriteAllLinesAsync(TextWriter writer, IEnumerable< string > contents, CancellationToken cancellationToken)
Definition File.cs:906
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363

References System.SR.Argument_EmptyPath, System.IO.File.AsyncStreamWriter(), System.cancellationToken, System.Threading.Tasks.Task< TResult >.FromCanceled(), and System.IO.File.InternalWriteAllLinesAsync().