mkstemp Questions

2

I want to create temporary files in given temporary directory path in Windows through C++. mktemp() does the required job, but it only creates 26 unique files. mkstemp() is working fine in Linux bu...
Cana asked 18/9, 2018 at 6:58

4

Solved

I am creating a tmp file by using : from tempfile import mkstemp I am trying to write in this file : tmp_file = mkstemp() file = open(tmp_file, 'w') file.write('TEST\n') Indeed I close the fi...
Android asked 18/7, 2016 at 12:40

4

Solved

Okay, mkstemp is the preferred way to create a temp file in POSIX. But it opens the file and returns an int, which is a file descriptor. From that I can only create a FILE*, but not an std::ofstr...
Belgian asked 31/1, 2009 at 21:41

2

Solved

Is it possible to get the file name (and path) from a call to mkstemp()? And if "yes", how?
Nitramine asked 8/9, 2015 at 16:57

3

Solved

Can anybody point me to the code that implements mkstemp() (C/C++) on Win32, or very close analog? Must be race-free. It's supposed to look like #include <windows.h> #include <io.h> //...
Lenny asked 17/5, 2011 at 19:43

6

Solved

tempfile.mkstemp() returns: a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that file, in that order. How do I convert th...
Prerequisite asked 3/10, 2008 at 19:41

3

Solved

I am transitioning a program that uses temporary files from POSIX FILE to C++ standard library iostreams. What's the correct alternative to mkstemp?
Haag asked 15/10, 2011 at 15:56

3

Solved

I'm playing around with mkstemp(), which provides a file descriptor, but I want to generate formatted output via fprintf(). Is there an easy way to transform the file descriptor provided by mkstemp...
Abiogenetic asked 21/12, 2009 at 17:30
1

© 2022 - 2024 — McMap. All rights reserved.