VFSBinaryExtensions.GetFileSize(thisIVirtualFileSystem,string).md
January 20, 2026 ยท View on GitHub
Atypical.VirtualFileSystem.Core
Atypical.VirtualFileSystem.Core.Extensions.VFSBinaryExtensions
VFSBinaryExtensions.GetFileSize(this IVirtualFileSystem, string) Method
Gets the size of a file in bytes.
public static long GetFileSize(this Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystem vfs, string filePath);
Parameters
The virtual file system.
filePath System.String
The file path as a string.
Returns
System.Int64
The size in bytes, or -1 if the file doesn't exist.