You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2018. It is now read-only.
I would like to create a temporary file. Packages tmp and node-temp set neither FILE_ATTRIBUTE_TEMPORARY nor FILE_FLAG_DELETE_ON_CLOSE attributes for the temporary file. These are required for Windows to keep the file in memory, emulating some kind of tmpfs. The problem is that this problem cannot be solved with plain fs API. cmd commands are of no help either, because the second flag should be set to CreateFile WinAPI, and cannot be set after the file is already created.
Could you add OS-specific options for fs.writeFile API, please?
I've been asked by Fedor Indutny which of these are most useful for Node users, and I'm not sure. I suppose the best solution would be to pass a number "as is", and leave the list of possible constants for some third-party package. If identifiers of those constants are changed, it would be harder to find the needed options, and would result in unnecessary duplication. All of these flags are of no use to the most of Node users, and there's no need to bloat the library.
The text was updated successfully, but these errors were encountered:
I think the right thing to do here would be to have some uv_fs_tmpfile function which uses tmpfile() (or mkstemp) on Unix and whatever equivalent on Windows. It would return the fd of the opened temporary file and then the rest of the fs functions should just work.
(Mostly following the lines of feature request for Node.js: nodejs/node-v0.x-archive#7593)
I would like to create a temporary file. Packages
tmp
andnode-temp
set neitherFILE_ATTRIBUTE_TEMPORARY
norFILE_FLAG_DELETE_ON_CLOSE
attributes for the temporary file. These are required for Windows to keep the file in memory, emulating some kind oftmpfs
. The problem is that this problem cannot be solved with plainfs
API.cmd
commands are of no help either, because the second flag should be set toCreateFile
WinAPI, and cannot be set after the file is already created.Could you add OS-specific options for
fs.writeFile
API, please?CreateFile
flags list:http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx
File attributes constants list:
http://msdn.microsoft.com/en-us/library/windows/desktop/gg258117(v=vs.85).aspx
I've been asked by Fedor Indutny which of these are most useful for Node users, and I'm not sure. I suppose the best solution would be to pass a number "as is", and leave the list of possible constants for some third-party package. If identifiers of those constants are changed, it would be harder to find the needed options, and would result in unnecessary duplication. All of these flags are of no use to the most of Node users, and there's no need to bloat the library.
The text was updated successfully, but these errors were encountered: