To find out the length of a file (in bytes) you would normally use FileInfo.Length
or System.IO.Stream.Length
(is there a difference?). Both are of type long, i.e. System.Int64, hence the maximal possible value is:
9 223 372 036 854 775 807
Now it seems some filesystems, such as NTFS5 or Microsoft's Resilient File System (ReFS) theoretically allow a maximum file size that exceeds the Int64 range - according to this source, ReFS limits maximal file size to 2^64-1 bytes, which equals to (for readability purposes):
18 446 744 073 709 551 615
How would one go about determining file size in such case - however hypothetical it may be - and would it impact normal Stream operations (such as using Read/Write methods etc.)?