|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.util.Platform
The Platform class is where I collect all platform specific APIs for things like end-of-line character and file lastModified methods... At some point, parts of this may need to be implemented in native code
| Field Summary | |
static java.lang.String |
ONWINDOWSPROP
You can set this system property on (any value will do) if you want to force the Platform class to use Win32 access to file properties and ConnectionManager.ini file. |
| Constructor Summary | |
Platform()
Deprecated. |
|
| Method Summary | |
static boolean |
caseSensitiveFileNames()
Returns true if file names are case sensitive. |
static java.lang.String |
getEOL()
Return the end of line convention. |
static boolean |
getFileExecutable(java.io.File file)
|
static double |
getFileLastModified(java.io.File file)
returns the last modified time for the given file via a native platform call |
static double |
getFileLastModified(java.lang.String fileName)
returns the last modified time for the given file via a native platform call |
static java.lang.String |
getFilePathDelim()
Return file name path delimiter. |
static boolean |
getFileWritable(java.io.File file)
|
static java.lang.String |
getHostAddress()
Return this machine's host IP Address |
static long |
getLastModified(java.io.File file)
returns the last modified time for the given file via a native platform call |
static long |
getLastModified(java.lang.String fileName)
returns the last modified time for the given file via a native platform call |
static java.lang.String |
getMachineName()
Return this machine's name |
static java.lang.String |
getOSName()
Gets a descriptive name for the operating system. |
static java.lang.String |
getSetReadOnlyCmd()
|
static java.lang.String |
getSetWritableCmd()
|
static java.lang.String |
getTouchCmd()
|
static GUID |
getWorkStationID()
|
static WorkStationOptions |
getWSOptions()
|
static boolean |
isDotNET()
Determines whether or not we are running in a .NET environment. |
static boolean |
isWin32()
Determines whether or not we are running on a Win32 computer. |
static void |
printProps()
|
static void |
setFileExecutable(java.io.File file,
boolean executable)
|
static void |
setFileLastModified(java.io.File file,
double oletime)
|
static void |
setFileWritable(java.io.File file,
boolean val)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ONWINDOWSPROP
| Constructor Detail |
public Platform()
| Method Detail |
public static boolean isWin32()
public static boolean isDotNET()
public static java.lang.String getOSName()
public static WorkStationOptions getWSOptions()
public static final java.lang.String getMachineName()
public static final java.lang.String getHostAddress()
public static final java.lang.String getEOL()
public static final java.lang.String getFilePathDelim()
public static boolean caseSensitiveFileNames()
public static java.lang.String getTouchCmd()
public static java.lang.String getSetReadOnlyCmd()
public static java.lang.String getSetWritableCmd()
public static GUID getWorkStationID()
public static long getLastModified(java.io.File file)
throws java.io.IOException
file - File
java.io.IOException
public static double getFileLastModified(java.io.File file)
throws java.io.IOException
file - File
java.io.IOException
public static long getLastModified(java.lang.String fileName)
throws java.io.IOException
fileName - String the absolute path to the file
java.io.IOException
public static double getFileLastModified(java.lang.String fileName)
throws java.io.IOException
fileName - String the absolute path to the file
java.io.IOException
public static void setFileLastModified(java.io.File file,
double oletime)
throws java.io.IOException
java.io.IOExceptionpublic static final boolean getFileWritable(java.io.File file)
public static void setFileWritable(java.io.File file,
boolean val)
throws java.io.IOException
java.io.IOException
public static boolean getFileExecutable(java.io.File file)
throws java.io.IOException
java.io.IOException
public static void setFileExecutable(java.io.File file,
boolean executable)
throws java.io.IOException
java.io.IOExceptionpublic static void printProps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||