Skip to content

Add more options than "if_newer" to fs.copy #458

Closed
@atollk

Description

@atollk

fs.copy offers free functions to copy a file system / directory / single file only if the source is newer than the destination. Those functions are marked by the _if_newer suffix.

I propose to add instead variants with just an _if suffix that take a strategy: str parameter to distinguish between different conditional cases rather than having to add three new _if_X functions. In particular, it would make supporting the following three strategies in addition to "if_newer" easy:

  • Only copy if the source is older than the destination.
  • Only copy if the destination does not exist.
  • Only copy if the destination already exists.

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