mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-03 08:13:18 +02:00
NTFileSystemAdapter: Use read-ahead mechanism unless FILE_NO_INTERMEDIATE_BUFFERING is set or FILE_RANDOM_ACCESS flag is set
This commit is contained in:
parent
8c0ff8fdad
commit
dae8a6b19e
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ namespace SMBLibrary
|
||||||
// of a file copy operation (where the caller will attempt to simply copy the reparse point).
|
// of a file copy operation (where the caller will attempt to simply copy the reparse point).
|
||||||
bool openReparsePoint = (openOptions & CreateOptions.FILE_OPEN_REPARSE_POINT) > 0;
|
bool openReparsePoint = (openOptions & CreateOptions.FILE_OPEN_REPARSE_POINT) > 0;
|
||||||
bool disableBuffering = (openOptions & CreateOptions.FILE_NO_INTERMEDIATE_BUFFERING) > 0;
|
bool disableBuffering = (openOptions & CreateOptions.FILE_NO_INTERMEDIATE_BUFFERING) > 0;
|
||||||
bool buffered = (openOptions & CreateOptions.FILE_SEQUENTIAL_ONLY) > 0 && !disableBuffering && !openReparsePoint;
|
bool buffered = (openOptions & CreateOptions.FILE_RANDOM_ACCESS) == 0 && !disableBuffering && !openReparsePoint;
|
||||||
FileShare fileShare = NTFileStoreHelper.ToFileShare(shareAccess);
|
FileShare fileShare = NTFileStoreHelper.ToFileShare(shareAccess);
|
||||||
string fileShareString = fileShare.ToString().Replace(", ", "|");
|
string fileShareString = fileShare.ToString().Replace(", ", "|");
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue