-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
40 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# :nocov: | ||
class PathList | ||
class Candidate | ||
# @api private | ||
module JrubyWindowsFix | ||
# @return [Boolean] whether this path is a directory (false for symlinks to directories) | ||
def directory? | ||
return @directory unless @directory.nil? | ||
|
||
@directory = if ::File.symlink?(@full_path) | ||
false | ||
else | ||
::File.directory?(@full_path) || false | ||
end | ||
end | ||
|
||
# @return [Boolean] whether this path exists | ||
def exists? | ||
return @exists if defined?(@exists) | ||
|
||
::File.exist?(@full_path) | ||
end | ||
|
||
private | ||
|
||
def ftype | ||
raise 'File.ftype follows symlinks in jruby in windows' | ||
end | ||
end | ||
end | ||
end | ||
# :nocov: |
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