Static Public Member Functions | |
static File | getCWD () |
static synchronized void | setCWD (String cwd) |
static synchronized File | createTempFileInCWD (String prefix, String suffix) throws IOException |
Class that gives access to the current working directory, effectively encapsulating the "user.dir" property. This feature was requested in Feb. 2005 by Lindsey, Brian, et.al.
Note that using files goes very much against ALMA's idea of location transparency of component locations, and against having a central archive to store data. This class should only be used in exceptional situations, such as for offline data reduction, or for other inevitable temporary file storage, where a component creates and deletes the files within its life cycle. Files should almost never be used for inter-component communication!
Note that on a diskless machine, the file created may well be located on a RAM disk and does not survive machine rebooting.
static synchronized File alma.acs.util.AcsCWD.createTempFileInCWD | ( | String | prefix, | |
String | suffix | |||
) | throws IOException [static] |
Creates a temp file in the current working dir.
prefix | The prefix string to be used in generating the file's name; must be at least three characters long | |
suffix | The suffix string to be used in generating the file's name; may be null , in which case the suffix ".tmp" will be used |
IOException |
References alma.acs.util.AcsCWD.getCWD().
static File alma.acs.util.AcsCWD.getCWD | ( | ) | [static] |
Gets the current working directory.
Referenced by alma.acs.util.AcsCWD.createTempFileInCWD().
static synchronized void alma.acs.util.AcsCWD.setCWD | ( | String | cwd | ) | [static] |
Sets the current working directory.
cwd |