The maximum file size that can be read in .net

What is the maximum file size that can be read in the .net Framework?

Is this a long (Int64) max because it is the type of offset in the Seek method throughout the reader?

+5
source share
4 answers

I believe the answer is "undefined" by language specification.

The search bias is based on the source, so you can search for a larger file max. You simply cannot search the file. In addition, the file object should not support read search. There's more info in the FileStream.Seek Documentation

, - , , . , , (, ..).

+8

. Seek() , C/++ fseek() 2 . . .NET , Windows ( NTFS 6) 17 592 185 978 880 , 2 ^ 63 - 1.

+4

, , , . NTFS 2 , FAT32 4 2 , .

+1

The theoretical maximum (not taking into account the limitations of the file system) is Int64.MaxValue, you guessed it. I'm not sure what will happen if you read the file longer than this, but this seems very unlikely;)

+1
source

All Articles