Package deltix.util.io
Class Home
- java.lang.Object
-
- deltix.util.io.Home
-
public abstract class Home extends java.lang.Object
Helper class to obtain Quant Server installation root directory at run time. It can be defined as environment variable DELTIX_HOME or Java System property "deltix.home".
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELTIX_HOME_SYS_PROP
-
Constructor Summary
Constructors Constructor Description Home()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
get()
static java.lang.String
getCommandPath(java.lang.String name)
static java.io.File
getFile()
static java.io.File
getFile(java.lang.String subPath)
static java.io.File
getFile(java.lang.String... subPaths)
Converts a path string, or a sequence of strings that when joined form a path string, to aPath
.static java.nio.file.Path
getNioPath()
static java.lang.String
getPath(java.lang.String subPath)
static java.lang.String
getPath(java.lang.String... subPaths)
static boolean
isSet()
static void
set(java.lang.String home)
-
-
-
Field Detail
-
DELTIX_HOME_SYS_PROP
public static final java.lang.String DELTIX_HOME_SYS_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
set
public static void set(java.lang.String home)
-
isSet
public static boolean isSet()
-
get
public static java.lang.String get()
-
getFile
public static java.io.File getFile()
-
getFile
public static java.io.File getFile(java.lang.String subPath)
-
getFile
public static java.io.File getFile(java.lang.String... subPaths)
Converts a path string, or a sequence of strings that when joined form a path string, to aPath
. Ifmore
does not specify any elements then the value of thefirst
parameter is the path string to convert. Ifmore
specifies one or more elements then each non-empty string, includingfirst
, is considered to be a sequence of name elements (seePath
) and is joined to form a path string. The details as to how the Strings are joined is provider specific but typically they will be joined using thename-separator
as the separator. For example, if the name separator is "/
" andgetPath("/foo","bar","gus")
is invoked, then the path string"/foo/bar/gus"
is converted to aPath
. APath
representing an empty path is returned iffirst
is the empty string andmore
does not contain any non-empty strings.The
Path
is obtained by invoking thegetPath
method of thedefault
FileSystem
.Note that while this method is very convenient, using it will imply an assumed reference to the default
FileSystem
and limit the utility of the calling code. Hence it should not be used in library code intended for flexible reuse. A more flexible alternative is to use an existingPath
instance as an anchor, such as:Path dir = ... Path path = dir.resolve("file");
- Parameters:
subPaths
- additional strings to be joined to form the path string- Returns:
- the resulting
File
- Throws:
java.nio.file.InvalidPathException
- if the path string cannot be converted to aPath
- See Also:
FileSystem.getPath(java.lang.String, java.lang.String...)
-
getPath
public static java.lang.String getPath(java.lang.String subPath)
-
getPath
public static java.lang.String getPath(java.lang.String... subPaths)
-
getNioPath
public static java.nio.file.Path getNioPath()
-
getCommandPath
public static java.lang.String getCommandPath(java.lang.String name)
-
-