Comments (2)
Since fs.existsSync() (https://nodejs.org/api/fs.html#fs_fs_existssync_path) is marked as deprecated, fs.statSync() is the only option left that is safe for the future. That being said, we need the file descriptor inside tmp, so I strongly vote against this.
Besides, the assumptions made herein are based on a self inflicted race condition, see also #91 (comment).
from node-tmp.
I've attempted to explain why the problem is not a race condition here.
In any case I have no idea what synchronous operations have to do with this proposal, nor why tmp
needs to hold the descriptor. AFAICT the only thing ever done with it is to close it when the remove callback is invoked.
from node-tmp.
Related Issues (20)
- Missing tag HOT 1
- cleanup results in impossible to debug EBADF error if file descriptor is already closed HOT 13
- method to get current base dir path HOT 2
- Random test failures when running async tests locally on the WIN32 platform HOT 2
- Change README.md reference of Graceful Cleanup
- EBADF with streams and pipeline HOT 7
- Why does tmp remove quotes from paths ? HOT 13
- Unknown "devtmpnodejsnpm-cache" folder HOT 2
- Breaking changes viped from changelog HOT 1
- Why does tmp.setGracefulCleanup() not work within jest tests? HOT 5
- unsafeCleanup fails on windows HOT 7
- Changelog no longer includes critical BREAKING CHANGE information HOT 12
- `tmp` should use `{ recursive: true }` when available with `unsafeCleanup: true` HOT 5
- Tmp files kept on disk HOT 1
- crypto.pseudoRandomBytes was deprecated and now uses randomBytes under the hood HOT 1
- setGracefulCleanup doesn't work for worker thread. HOT 3
- 0.2.2 was tagged but not published HOT 9
- How to actually "STORE" file into these temp objects? HOT 1
- Using Frogbot to scan this repository HOT 1
- Please consider to upgrade rimraf to latest version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-tmp.