Skip to content

splitpath does not accept AbstractString, though its doc mentions so #32995

@tanmaykm

Description

@tanmaykm

splitpath should probably accept AbstractString as its doc mentions here

It fails now:

julia> path = "/folder1/folder2/folder3/file"
"/folder1/folder2/folder3/file"

julia> subpath = SubString(path, 9)
"/folder2/folder3/file"

julia> splitpath(subpath)
ERROR: MethodError: no method matching splitpath(::SubString{String})
Closest candidates are:
  splitpath(::String) at path.jl:230
Stacktrace:
 [1] top-level scope at REPL[3]:1

My versioninfo:

julia> versioninfo()
Julia Version 1.4.0-DEV.21
Commit 25a05f088d* (2019-08-20 21:46 UTC)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions