12345678910111213141516171819202122232425262728293031323334353637383940 | '\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Path.move 3 2026-09-01 "Tomo man-pages"
.SH NAME
Path.move \- move a file or directory
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Path.move\ :\ func(path:\ Path,\ dest:\ Path,\ overwrite:\ Bool\ =\ no\ ->\ Result)
.fi
.SH DESCRIPTION
Moves the file or directory from one location to another.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
path Path The path to move. -
dest Path The destination to move the path to. -
overwrite Bool Whether to permit overwriting the destination if it is an existing file or directory. no
.TE
.SH RETURN
Either `Success` or `Failure{reason}`.
.SH NOTES
With `overwrite=no`, the refusal and the move are a single operation the kernel performs indivisibly, so another process cannot slip a file into the destination in between. Moving a directory across filesystems is the one case that cannot be done that way and falls back to checking first.
.SH EXAMPLES
.EX
(./file.txt).move(/tmp/renamed.txt)!
.EE
.SH SEE ALSO
.BR Tomo-Path (3)
|