private static InputStream getCowFromPath ( final String path ) { String cwd = System . getProperty ( "user.dir" ) ; // TODO is this really CWD? if ( cwd != null ) { File cowfile = new File ( cwd , path ) ; if ( isCowfile ( cowfile ) ) { return cowfileToCowInputStream ( cowfile ) ; } } // maybe it's an absolute path? File cowfile = new File ( path ) ; if ( isCowfile ( cowfile ) ) { return cowfileToCowInputStream ( cowfile ) ; } return null ; }
In the case that the cowfileSpec is a filesystem path call this method to attempt to load the cowfile . It will attempt to load the cowfile relative to CWD and if that fails it will try as an absolute path .