import { Path } from "https://deno.land/x/libpkgx@v0.15.2/mod.ts";
Moves a file.
Path.root.join("bar").mv({to: Path.home.join("foo")})
// => Path("/Users/mxcl/foo")
- Parameter to: Destination filename.
- Parameter into: Destination directory (you get `into/${this.basename()`)
- Parameter overwrite: If true overwrites any entry that already exists at the destination.
- Returns: `to` to allow chaining.
- Note: `force` will still throw if `to` is a directory.
- Note: Throws if `overwrite` is `false` yet `to` isalready* identical to
`self` because even thoughour policy* is to noop if the desired
end result preexists, checking for this condition is too expensive a
trade-off.