Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

MFS ipfs.files.cp arguments #262

Closed
Closed
@achingbrain

Description

@achingbrain

What's the thinking behind the ipfs.files.cp arguments? Specifically why is the first argument an array?

ipfs.files.cp([sourceFile, destinationFile], callback)

It could be more straightforward as:

ipfs.files.cp(sourceFile, destinationFile, callback)

I suppose maybe you'd want to imitate the unix cp command and support both the above and:

ipfs.files.cp(...sourceFiles, destinationDirectory, callback)

Obviously JavaScript doesn't support left-variadic functions so you'd have to emulate it by interrogating arguments but that's an implementation detail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions