System.IO.FileStream FileAccess vs FileShare

后端 未结 3 385
花落未央
花落未央 2020-11-30 05:07

I\'ve searched all over but can\'t find an answer to this question. I understand that FileAccess deals with file access on the machine and FileShare deals with the share, b

3条回答
  •  再見小時候
    2020-11-30 05:29

    The FileShare has nothing to do with drives shared over a network - it indicates how other processes can access the file.

    If the first process opens the file with FileShare.Read, other processes can open the file with FileAccess.Read, but another process cannot open the file with FileAccess.Write in that case.

提交回复
热议问题