@ Pure public static File convertStringToFile ( String filename ) { if ( filename == null || "" . equals ( filename ) ) { //$NON-NLS-1$ return null ; } if ( isWindowsNativeFilename ( filename ) ) { return normalizeWindowsNativeFilename ( filename ) ; } // Test for malformed filenames. return new File ( extractLocalPath ( filename ) . replaceAll ( Pattern . quote ( UNIX_SEPARATOR_STRING ) , Matcher . quoteReplacement ( File . separator ) ) ) ; }
Convert a string which represents a local file into a File .