105 if (
path.Length == 0)
252 if (
path.Length == 0)
265 if (encoding ==
null)
269 if (
path.Length == 0)
288 if (
path.Length == 0)
302 if (encoding ==
null)
306 if (
path.Length == 0)
318 if (
length >
int.MaxValue)
348 if (
path.Length == 0)
366 if (
path.Length == 0)
379 if (encoding ==
null)
383 if (
path.Length == 0)
401 return list.ToArray();
410 if (
path.Length == 0)
423 if (encoding ==
null)
427 if (
path.Length == 0)
445 if (contents ==
null)
449 if (
path.Length == 0)
467 if (contents ==
null)
471 if (encoding ==
null)
475 if (
path.Length == 0)
486 foreach (
string content
in contents)
488 writer.WriteLine(content);
499 if (
path.Length == 0)
513 if (encoding ==
null)
517 if (
path.Length == 0)
531 if (contents ==
null)
535 if (
path.Length == 0)
548 if (contents ==
null)
552 if (encoding ==
null)
556 if (
path.Length == 0)
648 if (encoding ==
null)
652 if (
path.Length == 0)
704 if (encoding ==
null)
708 if (
path.Length == 0)
716 if (
string.IsNullOrEmpty(contents))
735 if (
length >
int.MaxValue)
784 if (num > 2147483591)
816 if (
path.Length == 0)
847 if (encoding ==
null)
851 if (
path.Length == 0)
873 return lines.ToArray();
887 if (contents ==
null)
891 if (encoding ==
null)
895 if (
path.Length == 0)
910 foreach (
string content
in contents)
940 if (encoding ==
null)
944 if (
path.Length == 0)
952 if (
string.IsNullOrEmpty(contents))
971 if (contents ==
null)
975 if (encoding ==
null)
979 if (
path.Length == 0)
1017 byte[]
array =
null;
1024 if (num ==
span.Length)
1026 uint
num2 = (uint)(
span.Length * 2);
1047 return span.Slice(0, num).ToArray();
static SafeFileHandle Open(string fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, long preallocationSize)
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void Add(TKey key, TValue value)
override void Dispose(bool disposing)
static DateTimeOffset GetLastAccessTime(string fullPath)
static void DeleteFile(string fullPath)
static void Encrypt(string path)
static FileSystemInfo ResolveLinkTarget(string linkPath, bool returnFinalTarget, bool isDirectory)
static DateTimeOffset GetLastWriteTime(string fullPath)
static void MoveFile(string sourceFullPath, string destFullPath, bool overwrite)
static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
static void SetCreationTime(string fullPath, DateTimeOffset time, bool asDirectory)
static bool FileExists(string fullPath)
static void Decrypt(string path)
static void SetLastWriteTime(string fullPath, DateTimeOffset time, bool asDirectory)
static DateTimeOffset GetCreationTime(string fullPath)
static void VerifyValidPath(string path, string argName)
static void SetAttributes(string fullPath, FileAttributes attributes)
static void ReplaceFile(string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors)
static void CreateSymbolicLink(string path, string pathToTarget, bool isDirectory)
static void SetLastAccessTime(string fullPath, DateTimeOffset time, bool asDirectory)
static FileAttributes GetAttributes(string fullPath)
static void AppendAllText(string path, string? contents)
static void AppendAllLines(string path, IEnumerable< string > contents, Encoding encoding)
static void SetCreationTime(string path, DateTime creationTime)
static void Replace(string sourceFileName, string destinationFileName, string? destinationBackupFileName, bool ignoreMetadataErrors)
static DateTime GetLastAccessTimeUtc(string path)
static Task AppendAllLinesAsync(string path, IEnumerable< string > contents, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static void SetAttributes(string path, FileAttributes fileAttributes)
static StreamWriter CreateText(string path)
static FileStream Create(string path)
static string InternalReadAllText(string path, Encoding encoding)
static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)
static DateTime GetLastAccessTime(string path)
static FileStream OpenWrite(string path)
static DateTime GetLastWriteTimeUtc(string path)
static string[] ReadAllLines(string path, Encoding encoding)
static void WriteAllLines(string path, string[] contents)
static bool Exists([NotNullWhen(true)] string? path)
static void AppendAllText(string path, string? contents, Encoding encoding)
static Task AppendAllLinesAsync(string path, IEnumerable< string > contents, CancellationToken cancellationToken=default(CancellationToken))
static void WriteAllLines(string path, string[] contents, Encoding encoding)
static void SetCreationTimeUtc(string path, DateTime creationTimeUtc)
static void SetLastWriteTime(string path, DateTime lastWriteTime)
static FileStream OpenRead(string path)
static byte[] ReadAllBytesUnknownLength(FileStream fs)
static FileStream Open(string path, FileMode mode, FileAccess access)
static async Task< byte[]> InternalReadAllBytesAsync(FileStream fs, int count, CancellationToken cancellationToken)
static void SetLastAccessTime(string path, DateTime lastAccessTime)
static Encoding s_UTF8NoBOM
static Task WriteAllLinesAsync(string path, IEnumerable< string > contents, CancellationToken cancellationToken=default(CancellationToken))
static void WriteAllText(string path, string? contents)
static string ReadAllText(string path, Encoding encoding)
static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc)
static void Replace(string sourceFileName, string destinationFileName, string? destinationBackupFileName)
static Task< byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken=default(CancellationToken))
static Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken=default(CancellationToken))
static string[] ReadAllLines(string path)
static DateTime GetCreationTime(string path)
static DateTime GetLastWriteTime(string path)
static Task< string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken=default(CancellationToken))
static StreamReader AsyncStreamReader(string path, Encoding encoding)
static DateTimeOffset GetUtcDateTimeOffset(DateTime dateTime)
static StreamWriter AsyncStreamWriter(string path, Encoding encoding, bool append)
static FileStream Open(string path, FileMode mode)
static void WriteAllLines(string path, IEnumerable< string > contents)
static string[] InternalReadAllLines(string path, Encoding encoding)
static StreamReader OpenText(string path)
static DateTime GetCreationTimeUtc(string path)
static FileStream Open(string path, FileStreamOptions options)
static void AppendAllLines(string path, IEnumerable< string > contents)
static IEnumerable< string > ReadLines(string path, Encoding encoding)
static Task AppendAllTextAsync(string path, string? contents, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static Task< string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static Task WriteAllTextAsync(string path, string? contents, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static async Task< string > InternalReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken)
static void InternalWriteAllLines(TextWriter writer, IEnumerable< string > contents)
static Task WriteAllTextAsync(string path, string? contents, CancellationToken cancellationToken=default(CancellationToken))
static void Copy(string sourceFileName, string destFileName)
static FileStream Create(string path, int bufferSize, FileOptions options)
static string ReadAllText(string path)
static IEnumerable< string > ReadLines(string path)
static void Move(string sourceFileName, string destFileName, bool overwrite)
static Task< string > ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static async Task< byte[]> InternalReadAllBytesUnknownLengthAsync(FileStream fs, CancellationToken cancellationToken)
static async Task InternalWriteAllLinesAsync(TextWriter writer, IEnumerable< string > contents, CancellationToken cancellationToken)
static void WriteAllText(string path, string? contents, Encoding encoding)
static void Encrypt(string path)
static FileSystemInfo CreateSymbolicLink(string path, string pathToTarget)
static SafeFileHandle OpenHandle(string path, FileMode mode=FileMode.Open, FileAccess access=FileAccess.Read, FileShare share=FileShare.Read, FileOptions options=FileOptions.None, long preallocationSize=0L)
static FileStream Create(string path, int bufferSize)
static async Task< string[]> InternalReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken)
static void Decrypt(string path)
static ? FileSystemInfo ResolveLinkTarget(string linkPath, bool returnFinalTarget)
static StreamWriter AppendText(string path)
static Task WriteAllLinesAsync(string path, IEnumerable< string > contents, Encoding encoding, CancellationToken cancellationToken=default(CancellationToken))
static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc)
static byte[] ReadAllBytes(string path)
static Task< string > ReadAllTextAsync(string path, CancellationToken cancellationToken=default(CancellationToken))
static async Task InternalWriteAllTextAsync(StreamWriter sw, string contents, CancellationToken cancellationToken)
static void Copy(string sourceFileName, string destFileName, bool overwrite)
static void WriteAllLines(string path, IEnumerable< string > contents, Encoding encoding)
static void Move(string sourceFileName, string destFileName)
static void WriteAllBytes(string path, byte[] bytes)
static Task AppendAllTextAsync(string path, string? contents, CancellationToken cancellationToken=default(CancellationToken))
static void Delete(string path)
static Encoding UTF8NoBOM
static FileAttributes GetAttributes(string path)
static bool IsDirectorySeparator(char c)
static string GetFullPath(string path)
static unsafe void WriteAtOffset(SafeFileHandle handle, ReadOnlySpan< byte > buffer, long fileOffset)
static ValueTask WriteAtOffsetAsync(SafeFileHandle handle, ReadOnlyMemory< byte > buffer, long fileOffset, CancellationToken cancellationToken, OSFileStreamStrategy strategy=null)
static ReadLinesIterator CreateIterator(string path, Encoding encoding)
static void ValidateArguments(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, long preallocationSize)
static byte Max(byte val1, byte val2)
static Exception SetCurrentStackTrace(Exception source)
static string IO_FileTooLong2GB
static string ArgumentNull_FileName
static string Format(string resourceFormat, object p1)
static string ArgumentNull_Path
static string Argument_EmptyPath
static string IO_FileNotFound_FileName
static string Argument_EmptyFileName
override string ToString()
StringBuilder Append(char value, int repeatCount)
static Task FromException(Exception exception)
static Task FromCanceled(CancellationToken cancellationToken)
static Task CompletedTask
static void ThrowEndOfFileException()
static DateTime SpecifyKind(DateTime value, DateTimeKind kind)