jenkins.plugins.simpleclearcase.util
Class OsUtil

java.lang.Object
  extended by jenkins.plugins.simpleclearcase.util.OsUtil

public class OsUtil
extends java.lang.Object

Author:
etavsam

Field Summary
static java.lang.String UNIX_NEWLINE
           
static java.lang.String UNIX_PATH_SEPARATOR
           
static java.lang.String WIN_NEWLINE
           
static java.lang.String WIN_PATH_SEPARATOR
           
 
Constructor Summary
OsUtil()
           
 
Method Summary
static java.lang.String getMailFromAuthor(java.lang.String author, boolean isUnix)
           
static java.lang.String getName(java.lang.String filePath, boolean isUnix)
           
static java.lang.String getNewline(boolean isUnix)
           
static java.lang.String getPath(java.lang.String filePath, boolean isUnix)
           
static java.lang.String getPathSeparator(boolean isUnix)
           
static java.lang.String transformPath(java.lang.String path, boolean isUnix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIN_NEWLINE

public static final java.lang.String WIN_NEWLINE
See Also:
Constant Field Values

UNIX_NEWLINE

public static final java.lang.String UNIX_NEWLINE
See Also:
Constant Field Values

WIN_PATH_SEPARATOR

public static final java.lang.String WIN_PATH_SEPARATOR
See Also:
Constant Field Values

UNIX_PATH_SEPARATOR

public static final java.lang.String UNIX_PATH_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

OsUtil

public OsUtil()
Method Detail

getPathSeparator

public static java.lang.String getPathSeparator(boolean isUnix)

getNewline

public static java.lang.String getNewline(boolean isUnix)

transformPath

public static java.lang.String transformPath(java.lang.String path,
                                             boolean isUnix)
Parameters:
path -
isUnix -
Returns:
transformed path depending on the OS being Unix or Windows

getMailFromAuthor

public static java.lang.String getMailFromAuthor(java.lang.String author,
                                                 boolean isUnix)

getName

public static java.lang.String getName(java.lang.String filePath,
                                       boolean isUnix)
Parameters:
filePath -
isUnix -
Returns:
the filename from path with the convention of unix

getPath

public static java.lang.String getPath(java.lang.String filePath,
                                       boolean isUnix)
Parameters:
filePath -
isUnix -
Returns:
the path without the filename without trailing slash


Copyright © 2004-2011. All Rights Reserved.