23 events
when toggle format what by license comment
9 hours ago comment added Jeyekomon While downloading a file test.odt, Firefox creates another (temporary) file test.odt.part in the current directory. And opening the file using LibreOffice Writer creates another (temporary) file .~lock.test.odt# in the current directory. Why they chose the current directory? It seems like a contradiction to what you're saying.
S Apr 11, 2020 at 20:14 history suggested Jagad Hariseno CC BY-SA 4.0
In C file is removed when reboot.
Apr 11, 2020 at 17:48 review Suggested edits
S Apr 11, 2020 at 20:14
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 12, 2017 at 7:31 history edited CommunityBot
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Apr 9, 2017 at 14:29 comment added Noumenon Does this advice apply when the temporary files may contain sensitive data?
Apr 13, 2016 at 17:26 comment added Brian In the case of C#, you probably want to FileAttributes.Temporary and/or FileOptions.DeleteOnClose. Assuming sufficient RAM, Windows will avoid storing such files on disk (see FILE_ATTRIBUTE_TEMPORARY paragraph under CreateFile function
Apr 8, 2016 at 14:32 vote accept SmallChess
Apr 7, 2016 at 11:14 review Suggested edits
Apr 7, 2016 at 12:48
Apr 7, 2016 at 4:15 history edited Arseni Mourzenko CC BY-SA 3.0
added 2 characters in body
Apr 6, 2016 at 22:37 comment added kasperd I would include additional quotes in the bash example: path="$(mktemp)". Not that it is strictly necessary here. But it is a good habit to always put " around $ expansion unless you have a very specific need not to.
Apr 6, 2016 at 19:55 comment added JensG The operating system makes it easy ... but caveat emptor: The Windows native API call creates temp files with a prefix and a 4-digit hex number. If the software does not properly cleanup their tempfiles (e.g. due to crashes or to not having DELETE rights), after some time Windows will spend an extraordinary time trying to find a unused file name. I never tried what happened when all 0x10000 combinations are used, but things become veeery slow when the folder starts to fill up.
Apr 6, 2016 at 19:45 history edited Arseni Mourzenko CC BY-SA 3.0
added 1889 characters in body
Apr 6, 2016 at 17:55 comment added 5gon12eder This is a good answer but it could be even better if you could edit the suggested use of library functions in and mention that they already provide the ability for an end-user to override the selection of the directory to create temporary files in via environment variables, should they really need it.
Apr 6, 2016 at 16:51 comment added musiphil @TMN: Sorry for the confusion. Please understand I never said that you said what you never said, either, and I just wanted to point out that readers could be misled into thinking that tmpfile or mktemp was the system call @gurka was seeking for.
Apr 5, 2016 at 22:43 comment added TMN @musiphil: I never said they'd fix the permission problem, I was responding to his question about using system calls to create the files.
Apr 5, 2016 at 18:28 comment added pipe @musiphil Both tmpfile and mktemp uses external variables to determine the path for temporary files. These may have been set up to point to another directory than /tmp/, perhaps a per-user directory. Trying to create a filename manually in /tmp/ may fail, while tmpfile and mktemp would return valid paths.
Apr 5, 2016 at 18:18 comment added musiphil @TMN: They are just library functions that run in the user space, and they don't have any magic to bypass the permission error given by the operating system.
Apr 5, 2016 at 17:29 comment added TMN @gurka: You should be calling tmpfile(3) to generate your temporary files, or at least calling mktemp(3) to create the file names.
Apr 5, 2016 at 17:01 comment added simon What do you mean by "make sure you let the operating system create a temporary file for you". So instead of e.g. fopen("/tmp/mytmpfile", "w"); I should make some system call to handle temporary files?
Apr 5, 2016 at 12:21 history edited Arseni Mourzenko CC BY-SA 3.0
made the answer less Unix-dependent.
Apr 5, 2016 at 12:11 history edited Arseni Mourzenko CC BY-SA 3.0
made the answer less Unix-dependent.
Apr 5, 2016 at 11:46 history answered Arseni Mourzenko CC BY-SA 3.0