16 return base.LengthCore;
27 if (directoryName ==
null)
55 : this(fileName, null, null, isNormalized: false)
59 internal FileInfo(
string originalPath,
string fullPath =
null,
string fileName =
null,
bool isNormalized =
false)
62 fullPath = fullPath ?? originalPath;
74 return new StreamWriter(base.NormalizedPath, append:
false);
79 return new StreamWriter(base.NormalizedPath, append:
true);
84 return CopyTo(destFileName, overwrite:
false);
89 if (destFileName ==
null)
93 if (destFileName.Length == 0)
99 return new FileInfo(fullPath,
null,
null, isNormalized:
true);
127 return new FileStream(base.NormalizedPath, mode, access, share);
142 MoveTo(destFileName, overwrite:
false);
145 public void MoveTo(
string destFileName,
bool overwrite)
147 if (destFileName ==
null)
151 if (destFileName.Length == 0)
171 public FileInfo Replace(
string destinationFileName,
string? destinationBackupFileName)
173 return Replace(destinationFileName, destinationBackupFileName, ignoreMetadataErrors:
false);
176 public FileInfo Replace(
string destinationFileName,
string? destinationBackupFileName,
bool ignoreMetadataErrors)
178 if (destinationFileName ==
null)
183 return new FileInfo(destinationFileName);
186 [SupportedOSPlatform(
"windows")]
192 [SupportedOSPlatform(
"windows")]
FileInfo(string originalPath, string fullPath=null, string fileName=null, bool isNormalized=false)
FileInfo Replace(string destinationFileName, string? destinationBackupFileName, bool ignoreMetadataErrors)
StreamWriter CreateText()
FileInfo CopyTo(string destFileName, bool overwrite)
FileInfo(string fileName)
void MoveTo(string destFileName)
FileInfo CopyTo(string destFileName)
void MoveTo(string destFileName, bool overwrite)
FileInfo Replace(string destinationFileName, string? destinationBackupFileName)
StreamWriter AppendText()
FileStream Open(FileStreamOptions options)
FileStream Open(FileMode mode, FileAccess access)
FileStream Open(FileMode mode, FileAccess access, FileShare share)
FileStream Open(FileMode mode)
static void DeleteFile(string fullPath)
static void MoveFile(string sourceFullPath, string destFullPath, bool overwrite)
static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
static void ReplaceFile(string sourceFullPath, string destFullPath, string destBackupFullPath, bool ignoreMetadataErrors)
static FileStream Create(string path)
static FileStream Open(string path, FileMode mode)
static void Encrypt(string path)
static void Decrypt(string path)
static ? string GetFileName(string? path)
static string GetFullPath(string path)
static ? string GetDirectoryName(string? path)
static string ArgumentNull_FileName
static string Format(string resourceFormat, object p1)
static string IO_FileNotFound_FileName
static string Argument_EmptyFileName
static string IO_PathNotFound_Path