|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.Platform
public final class Platform
Information about the current platform.
| Nested Class Summary | |
|---|---|
static class |
Platform.EOL
The end-of-line sequence on different platforms |
static interface |
Platform.WorkStationOptions
Platform specific options saved in local workstation .ini files A Windows & a Unix implementation are available Applications should have no reason to implement this interface |
| 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. |
| Method Summary | |
|---|---|
static boolean |
getCaseSensitiveFileNames()
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)
Return true if the file is "executable" by the user. |
static DateTime |
getFileLastModified(java.io.File file)
returns the last modified time for the given file via a native platform call |
static DateTime |
getFileLastModified(java.lang.String fileName)
returns the last modified time for the given file via a native platform call |
static long |
getFileLength(java.lang.String fileName)
|
static java.lang.String |
getFilePathDelimiter()
Return file name path delimiter. |
static boolean |
getFileWritable(java.io.File file)
return true if the file is writable |
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()
return the 'set read only' command |
static java.lang.String |
getSetWritableCmd()
return the 'set writable' command |
static java.lang.String |
getTempDirectoryPath()
returns the path to the temp directory, if available, or to the local directory if not |
static java.lang.String |
getTouchCmd()
return the touch command |
static GUID |
getWorkStationID()
return the Workstation GUID |
static Platform.WorkStationOptions |
getWSOptions()
|
static boolean |
isDotNET()
Determines whether or not we are running in a .NET environment. |
static boolean |
isRemoteDrive(java.lang.String fileName)
|
static boolean |
isWin32()
Determines whether or not we are running on a Win32 computer. |
static void |
loadFileAttributes(FileAccess.Attributes[] attributes)
Load all available attributes from the file system in bulk (where necessary) Each attribute object in the array should have the fully qualified file name (with path) specified. |
static java.lang.String[] |
parse(java.lang.String payload,
java.lang.String pattern)
Parse the given payload using a regular expression pattern Picks an appropriate platform specific pattern matcher, i.e, this implementation depends upon a core-edge strategy using the Pattern class in java and the RegEx class in .NET |
static void |
setFileExecutable(java.io.File file,
boolean executable)
Change whether or not the specified file should be marked "executable". |
static void |
setFileLastModified(java.io.File file,
double oletime)
Set the last modification time for the file |
static void |
setFileWritable(java.io.File file,
boolean val)
set the file writable bit |
| 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
| Method Detail |
|---|
public static boolean isWin32()
public static boolean isDotNET()
public static java.lang.String getOSName()
public static java.lang.String getTempDirectoryPath()
public static Platform.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 getFilePathDelimiter()
public static java.lang.String[] parse(java.lang.String payload,
java.lang.String pattern)
payload - the string to be parsedpattern - the regular expression to match
public static boolean getCaseSensitiveFileNames()
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 DateTime 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 DateTime getFileLastModified(java.lang.String fileName)
throws java.io.IOException
fileName - String the absolute path to the file
java.io.IOException
public static long getFileLength(java.lang.String fileName)
throws java.io.IOException
fileName - the name of the specified file
java.io.IOException - if an I/0 error occurs trying to access the file.public static boolean isRemoteDrive(java.lang.String fileName)
fileName - the fully qualified name of the specified file
public static void setFileLastModified(java.io.File file,
double oletime)
throws java.io.IOException
file - the fileoletime - the last modified time
java.io.IOException - throw an excpetion on errorpublic static final boolean getFileWritable(java.io.File file)
file - the file
public static void setFileWritable(java.io.File file,
boolean val)
throws java.io.IOException
file - the fileval - true to mark the file as writable
java.io.IOException - throw an exception on error
public static boolean getFileExecutable(java.io.File file)
throws java.io.IOException
file - the specified file
java.io.IOException - if an I/0 error occurs trying to access the file.
public static void setFileExecutable(java.io.File file,
boolean executable)
throws java.io.IOException
file - the specified fileexecutable - true if the file should be marked executable
java.io.IOException - if an I/0 error occurs trying to access the file.public static void loadFileAttributes(FileAccess.Attributes[] attributes)
attributes - the attributes to load
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||