You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/30 18:38:31 UTC

svn commit: r809374 - in /commons/sandbox/runtime/trunk/src/main/native: include/acr_file.h include/acr_filemk.h os/unix/temps.c os/win32/temps.c test/testsuite.c

Author: mturk
Date: Sun Aug 30 16:38:30 2009
New Revision: 809374

URL: http://svn.apache.org/viewvc?rev=809374&view=rev
Log:
Remove filemk.h use file.h instead

Removed:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_filemk.h
Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h
    commons/sandbox/runtime/trunk/src/main/native/os/unix/temps.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
    commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h?rev=809374&r1=809373&r2=809374&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h Sun Aug 30 16:38:30 2009
@@ -177,12 +177,43 @@
 ACR_DECLARE(jobject) ACR_IoFileObjectCreate(JNIEnv *_E, const acr_pchar_t *fname,
                                             int ftype);
 
+                                            /** Create temporary unique file.
+ * @param env JNI environment to use. If NULL no exception will be thrown
+ *            if stat fails.
+ * @pamap tmpath Path where to create the file.
+ * @param prefix File prefix.
+ * @param preserve Non zero to survive file close.
+ * @return File descriptor or -1 o failure.
+ */
+ACR_DECLARE(int) ACR_TempFileMake(JNIEnv *env, const acr_pchar_t *tmpath,
+                                  const acr_pchar_t *prefix, int preserve);
+
+/** Create temporary unique directory.
+ * @param env JNI environment to use. If NULL no exception will be thrown
+ *            if stat fails.
+ * @pamap tmpath Path where to create the directory.
+ * @param prefix Directory prefix.
+ * @return Newly created unique directory path. Use ACR_Free when no longer
+ *         needed.
+ */
+ACR_DECLARE(char *) ACR_TempDirMake(JNIEnv *env, const acr_pchar_t *tmpath,
+                                    const char *prefix);
+
+/** Get system temporary directory.
+ * @param env JNI environment to use. If NULL no exception will be thrown
+ *            if temprary directory cannot be found.
+ * @return Temporary directory.
+ */
+ACR_DECLARE(const acr_pchar_t *) ACR_TempPathGet(JNIEnv *env);
+
+
 /** Get Filename from file descriptor.
  * @param env JNI environment to use.
  * @param fd File descriptor for which to get the name.
  */
 ACR_DECLARE(const acr_pchar_t *) ACR_FileNameGet(JNIEnv *env, int fd);
 
+
 #ifdef __cplusplus
 }
 #endif

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/temps.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/temps.c?rev=809374&r1=809373&r2=809374&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/temps.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/temps.c Sun Aug 30 16:38:30 2009
@@ -24,7 +24,6 @@
 #include "acr_descriptor.h"
 #include "acr_env.h"
 #include "acr_file.h"
-#include "acr_filemk.h"
 
 static const char *_try_dirs[] = {
     "/tmp",

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c?rev=809374&r1=809373&r2=809374&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c Sun Aug 30 16:38:30 2009
@@ -23,7 +23,6 @@
 #include "acr_descriptor.h"
 #include "acr_env.h"
 #include "acr_file.h"
-#include "acr_filemk.h"
 
 static int tmp_file_cleanup(void *file, int type, unsigned int flags)
 {

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c?rev=809374&r1=809373&r2=809374&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c Sun Aug 30 16:38:30 2009
@@ -29,7 +29,6 @@
 #include "acr_pointer.h"
 #include "acr_descriptor.h"
 #include "acr_file.h"
-#include "acr_filemk.h"
 #include "acr_xdr.h"
 #include "acr_shm.h"
 #include "acr_crypto.h"