-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Prevent FS write from draining Resources content
Previously, when writing to an FS-Adapter, a Resources content stream would be drained, making it impossible to access a Resources content again. With this change, by default a Resources content will be buffered while draining its content stream. An optional 'drain' parameter can be supplied to skip buffering to lower the memory demand of the operation in cases where further access to the resource content is not required. Alternatively, an optional 'readOnly' parameter can be supplied to skip buffering and instead create a new readable stream of the written file. The file will be written with '444' (read only) permissions. This can also help reducing memory usage. Add a pessimistic check for drained content streams. Refactor FS- and memory adapter unit tests.
- Loading branch information
1 parent
c8cc5cd
commit 370f121
Showing
8 changed files
with
398 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.