Proposal to allow files to pass through `dest` without writing them to disk.
See original GitHub issue@jonschlinkert and I have been trying to figure out a way to pipe files through dest
but not actually write the files to disk or create the directories.
The goal is to ensure the file properties are updated using the same logic from prepare-write, then use the properties in another stream plugin. Our specific use case is to create a directory tree from the destination file paths.
We’ve come up with this solution, which uses a file.writeFile
property to skip creating the destination directory and return early in write-contents
when set to false
.
Will you accept a pull request with this change, or suggest another way we could accomplish the same thing?
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (15 by maintainers)
Top Results From Across the Web
Techniques for Reading and Writing Files Without File ...
Explains how to create and manage files and directories.
Read more >How to Fix the "Upload: Failed to Write File to Disk" Error in ...
In this article, we'll explain why you may be seeing the “Upload: Failed to Write File to Disk” error on your WordPress site....
Read more >The File System Access API: simplifying access to local files
After a user grants a web app access, this API allows them to read or save changes directly to files and folders on...
Read more >Best Practices for Data Destruction - Protecting Student Privacy
✓ Avoid using file deletion, disk formatting, and “one way” encryption to dispose of sensitive data—these methods are not effective because ...
Read more >10 Secure File Sharing Options, Tips and Solutions - Varonis
Let's walk through some of the key positives and negatives about the process. Pros. Allows you to transfer large files over a network...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting side note that I didn’t want to type on my phone last night: in refactoring the tests, I’ve found a lot of inconsistencies with the
prepareWrite
module and would like to have it fully unit tested apart fromgulp.dest
. So this issue comes at an opportune time. We also want to reach parity with thegulp.src
method (ref #191) so a module could expose a src/dest prepare stream. As soon as I finish this test refactor, I’ll look into splitting it apart.Due to this always being a Transform stream, the tests will have to always use
from
andto
orconcat
. The reason vinyl-fs sinks is due to a bad pattern we support (sometimes a Transform stream/sometimes a writeable)