voxforge.org
VoxForge Dev

Ticket #171 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

All temporary files must be stored in temporary directory

Reported by: kmaclean Assigned to: kmaclean
Priority: minor Milestone: SpeechSubmission 0.1
Component: SpeechSubmission Version: Website 0.2
Keywords: Cc:

Description

Currently, some files are being stored in default user directory

Change History

08/28/07 16:45:17 changed by kmaclean

  • type changed from defect to enhancement.

08/28/07 22:04:04 changed by kmaclean

  • priority changed from major to minor.

09/21/07 13:52:05 changed by kmaclean

see Real's how-to: Create a temporary file

The location of the directory used to hold temporary files is defined by the property java.io.tmpdir. The default value can be changed with the command line used to launch the JVM :

java -Djava.io.tmpdir=C:\mydir  myClass

or , on Windows, you can set the environment variable TMP to a different value.

On some plateform, the temporary directory returned by java.io.tmpdir do not include a trailing slash. That is,

Win NT  --> C:\TEMP\
Win XP  --> C:\TEMP
Solaris --> /var/tmp/
Linux   --> /var/tmp

It's not a bad idea to check if there is a trailing slash or not.

String tempdir = System.getProperty("java.io.tmpdir");

if ( !(tempdir.endsWith("/") || tempdir.endsWith("\\")) )
   tempdir = tempdir + System.getProperty("file.separator");

09/21/07 13:58:48 changed by kmaclean

See Sun RFE #4735419

File f=File.createTempFile(...);
f.delete();
f.mkdir();

09/21/07 14:40:15 changed by kmaclean

  • status changed from new to closed.
  • resolution set to fixed.

10/12/07 14:13:40 changed by root

  • milestone deleted.

Milestone SpeechSubmission 0.1 deleted

10/12/07 14:25:34 changed by kmaclean

  • milestone set to SpeechSubmission 0.1.