VFSSafeExtensions.TryRenameFile(thisIVirtualFileSystem,string,string).md
January 20, 2026 ยท View on GitHub
Atypical.VirtualFileSystem.Core
Atypical.VirtualFileSystem.Core.Extensions.VFSSafeExtensions
VFSSafeExtensions.TryRenameFile(this IVirtualFileSystem, string, string) Method
Safely renames a file without throwing exceptions.
public static bool TryRenameFile(this Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystem vfs, string filePath, string newName);
Parameters
The virtual file system.
filePath System.String
The file path as a string.
newName System.String
The new file name.
Returns
System.Boolean
True if the file was renamed successfully, false otherwise.