Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
16 additions
and 2 deletions.
- +1 −1 core/src/main/java/org/jruby/RubyFileStat.java
- +5 −0 core/src/main/java/org/jruby/util/AbstractFileResource.java
- +5 −0 core/src/main/java/org/jruby/util/EmptyFileResource.java
- +1 −0 core/src/main/java/org/jruby/util/FileResource.java
- +0 −1 core/src/main/java/org/jruby/util/JarResource.java
- +4 −0 core/src/main/java/org/jruby/util/RegularFileResource.java
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -18,6 +18,7 @@ public interface FileResource { | ||
boolean isDirectory(); | ||
boolean isFile(); | ||
boolean canExecute(); | ||
int errno(); | ||
|
||
long lastModified(); | ||
long length(); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,7 +1,6 @@ | ||
package org.jruby.util; | ||
|
||
import jnr.posix.FileStat; | ||
|
||
import java.io.UnsupportedEncodingException; | ||
import java.net.URLDecoder; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -72,6 +72,10 @@ public boolean canExecute() { | ||
return file.canExecute(); | ||
} | ||
|
||
public int errno() { | ||
return posix.errno(); | ||
} | ||
|
||
@Override | ||
public boolean isFile() { | ||
return file.isFile(); | ||