0

I need to access random parts of a very large file across the network. (SMB protocol)

  • Does FileStream.Seek() actually read the data (copying down the entire file in the process) when doing a fs.Seek()?

  • Is there anything I can do to reduce or buffer this IO?

My intent is to poll the end of a large file for changes, and if they exist read forward from a bookmark (fixed position) in .NET.

makerofthings7
  • 60,103
  • 53
  • 215
  • 448
  • Have you found your answer? I'm interested to hear the answer. My guess is, this will be system's dependant. Basically SMB provides `seek` operation, but it depends whether .NET & OS will utilize it or not. On Windows you may get the correct `seek` behavior. – Thariq Nugrohotomo Jul 29 '17 at 21:58

1 Answers1

0

No. It is going to operate only on local data in a stream data type. That the FileStream is "cached" locally does not mean that you are performing a .seek() on data on some remote filesystem, but instead downloading it as a stream onto your local machine. Please see this link (http://technet.microsoft.com/en-us/library/bb933993(v=sql.105).aspx) for more about FileStream over network.

L0j1k
  • 12,255
  • 7
  • 53
  • 65