Skip to content

Commit

Permalink
define == completely
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 21, 2024
1 parent 4a0be75 commit 4ea5892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,9 @@ function Base.getproperty(obj::FileKind, p::Symbol)
end
Base.isless(a::FileKind, b::FileKind) = isless(a.name, b.name)
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::AbstractString, b::FileKind) = a == b.name
==(a::FileKind, b::AbstractString) = b == a
==(a::FileKind, b::FileKind) = a.name == b.name && a.dir == b.dir && a.rawtype == b.rawtype
joinpath(obj::FileKind, args...) = joinpath(obj.path, args...)
Base.convert(::Type{String}, obj::FileKind) = obj.name
isunknown(obj::FileKind) = obj.rawtype == UV_DIRENT_UNKNOWN
Expand Down

0 comments on commit 4ea5892

Please sign in to comment.