Skip to content

Commit

Permalink
rm odd methods
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 21, 2024
1 parent 4ea5892 commit e16a94a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -943,11 +943,8 @@ 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::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
islink(obj::FileKind) = isunknown(obj) ? islink(obj.path) : obj.rawtype == UV_DIRENT_LINK
isfile(obj::FileKind) = (isunknown(obj) || islink(obj)) ? isfile(obj.path) : obj.rawtype == UV_DIRENT_FILE
Expand Down

0 comments on commit e16a94a

Please sign in to comment.