Skip to content

add rename function without directory/file distinction  #58

@agentm

Description

@agentm

On both Windows and Posix platforms, the invocation of the underlying rename function is identical, so the value of explicitly choosing either the directory or file API is diminished. In my specific use case, I wanted to implement renameSync but had to swipe the System.Directory's implementation instead of being able to rely on the System.Directory module.

In addition, checking for a file or directory in advance opens a potential race condition and blocks usage of rename against non-file, non-directory nodes such as devices.

For my use case, a rename function which ignores the directory/file distinction would have solved the problem.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions