Package org.jruby.util

Examples of org.jruby.util.JRubyFile.toURI()


            // check current directory; if file exists, retrieve URL and return resource
            try {
                JRubyFile file = JRubyFile.create(runtime.getCurrentDirectory(), RubyFile.expandUserPath(runtime.getCurrentContext(), namePlusSuffix));
                if (file.isFile() && file.isAbsolute()) {
                    try {
                        foundResource = new LoadServiceResource(file.toURI().toURL(), namePlusSuffix);
                        state.loadName = namePlusSuffix;
                        break;
                    } catch (MalformedURLException e) {
                        throw runtime.newIOErrorFromException(e);
                    }
View Full Code Here


                    }
                    actualPath = JRubyFile.create(JRubyFile.create(runtime.getCurrentDirectory(), loadPathEntry).getAbsolutePath(), RubyFile.expandUserPath(runtime.getCurrentContext(), namePlusSuffix));
                }
                if (actualPath.isFile()) {
                    try {
                        foundResource = new LoadServiceResource(actualPath.toURI().toURL(), reportedPath);
                    } catch (MalformedURLException e) {
                        throw runtime.newIOErrorFromException(e);
                    }
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.