Package kiyut.sketsa.util
Class IOUtilities
- java.lang.Object
-
- kiyut.sketsa.util.IOUtilities
-
public class IOUtilities extends Object
Collection of I/O Utilities- Author:
- KIYUT
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetExtension(File file)Return the extension portion of the file's name or null.static JFileChoosergetFileChooser()Return JFileChooser that remember the last opened directory based onSystem.getProperty("user.dir")valuestatic Stringrelativize(File base, File file)static voidsetUserDir(File file)Convenience methods to set user's current working directory akaSystem.getProperty("user.dir").
-
-
-
Method Detail
-
getFileChooser
public static JFileChooser getFileChooser()
Return JFileChooser that remember the last opened directory based onSystem.getProperty("user.dir")value- Returns:
JFileChooser
-
setUserDir
public static void setUserDir(File file)
Convenience methods to set user's current working directory akaSystem.getProperty("user.dir"). If the param is not a directory it will look for the contained directory, if null set asFileSystemView.getFileSystemView().getDefaultDirectory(), otherwise just set as it is.- Parameters:
file-File
-
-