mockFs.File.GetUnixFileMode(filePath) is UnixFileMode.OtherRead, GroupRead, UserWrite, UserRead instead of UnixFileMode.UserRead given the following:
IFileSystem fs = ...
var options = new FileStreamOptions
{
Access = FileAccess.Write,
Mode = FileMode.CreateNew,
UnixCreateMode = UnixFileMode.UserRead
};
await using var stream = fs.FileStream.New(filePath, options);
It looks like New should pass it along.
|
#if FEATURE_FILESYSTEM_STREAM_OPTIONS |
|
/// <inheritdoc cref="IFileStreamFactory.New(string, FileStreamOptions)" /> |
|
public FileSystemStream New(string path, FileStreamOptions options) |
|
{ |
|
using IDisposable registration = _fileSystem.StatisticsRegistration |
|
.FileStream.RegisterMethod(nameof(New), |
|
path, options); |
|
|
|
return New(path, |
|
options.Mode, |
|
options.Access, |
|
options.Share, |
|
options.BufferSize, |
|
options.Options); |
|
} |
|
#endif |
mockFs.File.GetUnixFileMode(filePath)isUnixFileMode.OtherRead, GroupRead, UserWrite, UserReadinstead ofUnixFileMode.UserReadgiven the following:It looks like
Newshould pass it along.Testably.Abstractions/Source/Testably.Abstractions.Testing/FileSystem/FileStreamFactoryMock.cs
Lines 183 to 198 in 1ce0ca5