cryptix.util.core
Class FileUtil
java.lang.Object
cryptix.util.core.FileUtil
public class FileUtil
extends java.lang.Object
(package private) static boolean | doFileOrDir(Properties properties, String name, File f)
|
(package private) static boolean | doZip(Properties properties, String name, File f) - same as above given a .zip or .jar file object.
|
static boolean | loadProperties(Properties properties, String name) - Load a Properties object from a file given its name.
|
doFileOrDir
(package private) static boolean doFileOrDir(Properties properties,
String name,
File f)
doZip
(package private) static boolean doZip(Properties properties,
String name,
File f)
same as above given a .zip or .jar file object. The difference with
this method is that the search does not go deeper than the top level;
ie. no directory recursion is done.
loadProperties
public static boolean loadProperties(Properties properties,
String name)
Load a Properties object from a file given its name. The search for
the specified file is carried out on all the files and directories
specified in the CLASSPATH environment variable (contents of the
java system property "java.class.path"). The search is also done on
the top level contents of ".zip" and ".jar" files. Finally the search
stops after the first successful completion of the loading process; ie.
after the first .properties file was found and was successfully
used to load the specified properties.
properties
- The java.util.Properties object to load.name
- The name of the properties file. If it does not
end with the suffix ".properties" one will be
added.
- True iff the properties object was loaded correctly