Changeset 20066 in vbox
- Timestamp:
- May 27, 2009 11:24:23 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/dir.h (modified) (2 diffs)
-
src/VBox/Runtime/r3/posix/dir-posix.cpp (modified) (1 diff)
-
src/VBox/Runtime/r3/win/dir-win.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dir.h
r19261 r20066 62 62 * @param pszPath Path to the directory to create. 63 63 * @param fMode The mode of the new directory. 64 */ 65 RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode); 64 */ RTDECL(int) RTDirCreate(const char *pszPath, RTFMODE fMode); 66 65 67 66 /** … … 74 73 */ 75 74 RTDECL(int) RTDirCreateFullPath(const char *pszPath, RTFMODE fMode); 75 76 /** 77 * Creates a directory with a temporary name which is guaranteed not 78 * to exists. It takes a path with a directory name template and 79 * overwrites a portion of it to create the unique name. The template 80 * may be any directory name with some numbers of `Xs` appended to it. 81 * The trailing `Xs` are replaced with the unique numbers. The 82 * directory is created with mode 0700. 83 * 84 * @returns iprt status code. 85 * @param pszTemplate Buffer with the template path. 86 */ 87 RTDECL(int) RTDirCreateTemp(char *pszTemplate); 76 88 77 89 /** -
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r14062 r20066 107 107 LogFlow(("RTDirCreate(%p={%s}, %RTfmode): returns %Rrc\n", pszPath, pszPath, fMode, rc)); 108 108 return rc; 109 } 110 111 RTDECL(int) RTDirCreateTemp(char *pszTemplate) 112 { 113 if (mkdtemp(pszTemplate)) 114 return VINF_SUCCESS; 115 116 return RTErrConvertFromErrno(errno); 109 117 } 110 118 -
trunk/src/VBox/Runtime/r3/win/dir-win.cpp
r14062 r20066 35 35 #define LOG_GROUP RTLOGGROUP_DIR 36 36 #include <Windows.h> 37 #include <io.h> 37 38 38 39 #include <iprt/dir.h> … … 128 129 129 130 131 RTDECL(int) RTDirCreateTemp(char *pszTemplate) 132 { 133 if (!_mktemp(pszTemplate)) 134 { 135 int rc = RTDirCreate(pszTemplate, 0700); 136 return rc; 137 } 138 return RTErrConvertFromWin32(GetLastError()); 139 } 140 141 130 142 RTDECL(int) RTDirRemove(const char *pszPath) 131 143 {
Note:
See TracChangeset
for help on using the changeset viewer.

