Package org.jruby.util

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


                    // when the directory for the file doesn't exist.
                    // Java in such cases just throws IOException.
                    File parent = theFile.getParentFile();
                    if (parent != null && parent != theFile && !parent.exists()) {
                        throw new FileNotFoundException(path);
                    } else if (!theFile.canWrite()) {
                        throw new PermissionDeniedException(path);
                    } else {
                        // for all other IO errors, just re-throw the original exception
                        throw ioe;
                    }
View Full Code Here


                    // when the directory for the file doesn't exist.
                    // Java in such cases just throws IOException.
                    File parent = theFile.getParentFile();
                    if (parent != null && parent != theFile && !parent.exists()) {
                        throw new FileNotFoundException(path);
                    } else if (!theFile.canWrite()) {
                        throw new PermissionDeniedException(path);
                    } else {
                        // for all other IO errors, just re-throw the original exception
                        throw ioe;
                    }
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.