MCPcopy Create free account
hub / github.com/beanshell/beanshell / pathToFile

Method pathToFile

src/bsh/Interpreter.java:1041–1055  ·  view source on GitHub ↗

Localize a path to the file name based on the bsh.cwd interpreter working directory.

( String fileName )

Source from the content-addressed store, hash-verified

1039 working directory.
1040 */
1041 public File pathToFile( String fileName )
1042 throws IOException
1043 {
1044 File file = new File( fileName );
1045
1046 // if relative, fix up to bsh.cwd
1047 if ( !file.isAbsolute() ) {
1048 String cwd = (String)getu("bsh.cwd");
1049 file = new File( cwd + File.separator + fileName );
1050 }
1051
1052 // The canonical file name is also absolute.
1053 // No need for getAbsolutePath() here...
1054 return new File( file.getCanonicalPath() );
1055 }
1056
1057 public static void redirectOutputToFile( String filename )
1058 {

Callers 2

sourceMethod · 0.95
invokeMethod · 0.80

Calls 1

getuMethod · 0.95

Tested by

no test coverage detected