Skip to content

Add keyword remove_destination to mv function #11145

Closed
@peter1000

Description

@peter1000

This is a follow up issue from comments:
#11024 (comment)

julia could add the kwarg: remove_destination::Bool=false to mv to be in line with cp

cp(src::AbstractString, dst::AbstractString; remove_destination::Bool=false, follow_symlinks::Bool=false)

If that is wanted I could do it.

reply StefanKarpinski
@StefanKarpinski > Yes please, @peter1000!


I just had a fast look and I think there are some other issues too:

  1. current docs say Move a file from src to dst. Related to second question: is it suppose to work also on directories?
  2. The real issue is here again similar we had in the cp discussion. symlinks. I tried a fast mv on a directory and obviously any absolute symlinks within the rootdir get broken if the folder is renamed.

I can fix this but the question is: should we also add the kw: follow_symlinks similar to copy.

cp(src::AbstractString, dst::AbstractString; remove_destination::Bool=false, follow_symlinks::Bool=false)

Relevant code portion: fs.jl
file.jl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions