alma::acs::util::AcsCWD Class Reference
List of all members.
|
Static Public Member Functions |
File | getCWD () |
synchronized void | setCWD (String cwd) |
synchronized File | createTempFileInCWD (String prefix, String suffix) throws IOException |
Detailed Description
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.
- Author:
- hsommer
- Since:
- ACS 5.0
Member Function Documentation
synchronized File alma::acs::util::AcsCWD::createTempFileInCWD |
( |
String |
prefix, |
|
|
String |
suffix |
|
) |
throws IOException [inline, static] |
|
|
Creates a temp file in the current working dir. - Parameters:
-
| 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 |
- Returns:
- a newly created file.
- Exceptions:
-
- See also:
- File#createTempFile(java.lang.String, java.lang.String, java.io.File)
|
File alma::acs::util::AcsCWD::getCWD |
( |
|
) |
[inline, static] |
|
|
Gets the current working directory. - Returns:
- File object which represents the directory.
|
synchronized void alma::acs::util::AcsCWD::setCWD |
( |
String |
cwd |
) |
[inline, static] |
|
|
Sets the current working directory. - Parameters:
-
|
The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:54:35 2009 for ACS Java API by
1.3.8