Skip to content

Commit

Permalink
fix == def
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 26, 2024
1 parent 779fd3f commit d81af8e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export
unlink,
walkdir

import Base.==

# get and set current directory

Expand Down Expand Up @@ -953,7 +952,7 @@ end
Base.propertynames(::FileKind) = (:dir, :name, :path, :rawtype)
Base.isless(a::FileKind, b::FileKind) = a.dir == b.dir ? isless(a.name, b.name) : isless(a.dir, b.dir)
Base.hash(o::FileKind, h::UInt) = hash(o.dir, hash(o.name, hash(o.rawtype, h)))
==(a::FileKind, b::FileKind) = a.name == b.name && a.dir == b.dir && a.rawtype == b.rawtype
Base.:(==)(a::FileKind, b::FileKind) = a.name == b.name && a.dir == b.dir && a.rawtype == b.rawtype
joinpath(obj::FileKind, args...) = joinpath(obj.path, args...)
isunknown(obj::FileKind) = obj.rawtype == UV_DIRENT_UNKNOWN
islink(obj::FileKind) = isunknown(obj) ? islink(obj.path) : obj.rawtype == UV_DIRENT_LINK
Expand Down

0 comments on commit d81af8e

Please sign in to comment.