mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-15 17:06:59 +02:00
IFileSystem: Added FileOptions parameter to OpenFile
This commit is contained in:
parent
340f55c26e
commit
03cff5e469
6 changed files with 74 additions and 238 deletions
|
@ -137,11 +137,12 @@ namespace SMBServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public override Stream OpenFile(string path, FileMode mode, FileAccess access, FileShare share)
|
||||
public override Stream OpenFile(string path, FileMode mode, FileAccess access, FileShare share, FileOptions options)
|
||||
{
|
||||
ValidatePath(path);
|
||||
string fullPath = m_directory.FullName + path;
|
||||
FileStream fileStream = File.Open(fullPath, mode, access, share);
|
||||
const int DefaultBufferSize = 4096;
|
||||
FileStream fileStream = new FileStream(fullPath, mode, access, share, DefaultBufferSize, options);
|
||||
if (!m_openHandles.ContainsKey(fullPath.ToLower()))
|
||||
{
|
||||
m_openHandles.Add(fullPath.ToLower(), fileStream.SafeFileHandle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue