com.togethersoft.openapi.util.file
Class FileName


public class FileName

Presents methods to convert OS-dependend presetation of full file name (with path) or list of ones to OS-neutral, and back.

Author:
TogetherSoft

Method Summary
 static StringconvertSeparatorsToSystemSeparators(String systemPath, String aPath)
           Converts OS-depended directory delimeters from UNIX to Windows or back.
 static StringfromSystemNeutral(String fileName)
           Converts all directory delimeters from OS-neutral to OS-depended ("/" for UNIX, "\" for Windows ).
 static StringlistFromSystemNeutral(String fileList)
           In file list converts all directory and path delimeters (":" for UNIX, ";" for Windows ) from OS-neutral to OS-depended.
 static StringlistToSystemNeutral(String fileList)
           In file list converts all directory and path delimeters (":" for UNIX, ";" for Windows ) from OS-depended to OS-neutral.
 static StringtoSystemNeutral(String fileName)
           Converts all directory delimeters from OS-depended ("/" for UNIX, "\" for Windows ) to OS-neutral.

Method Detail

convertSeparatorsToSystemSeparators

public static String convertSeparatorsToSystemSeparators(String systemPath, String aPath)
Converts OS-depended directory delimeters from UNIX to Windows or back.
Parameters:
systemPath - Path string presents OS-specific form (UNIX or Windows).
Returns: Converted aPath if convertion has been produced, aPath otherwise.

fromSystemNeutral

public static String fromSystemNeutral(String fileName)
Converts all directory delimeters from OS-neutral to OS-depended ("/" for UNIX, "\" for Windows ).
Parameters:
fileName - Name of file with path in OS-neutral form.
Returns: Old converted string.

listFromSystemNeutral

public static String listFromSystemNeutral(String fileList)
In file list converts all directory and path delimeters (":" for UNIX, ";" for Windows ) from OS-neutral to OS-depended.
Parameters:
fileList - List of files delimeted by OS-neutral delimeters.
Returns: Old converted string.

listToSystemNeutral

public static String listToSystemNeutral(String fileList)
In file list converts all directory and path delimeters (":" for UNIX, ";" for Windows ) from OS-depended to OS-neutral.
Parameters:
fileList - List of files delimeted by OS-depended delimeters.
Returns: Old converted string.

toSystemNeutral

public static String toSystemNeutral(String fileName)
Converts all directory delimeters from OS-depended ("/" for UNIX, "\" for Windows ) to OS-neutral.
Parameters:
fileName - Name of file with path in OS-depended form.
Returns: Old converted string.