code / tomo

Lines41.8K C24.0K Markdown9.8K YAML5.0K Tomo2.3K
8 others 800
make256 Python231 Shell220 INI47 Text21 SVG16 Lua6 diff3
(37 lines)
1 '\" t
2 .\" Copyright (c) 2026 Bruce Hill
3 .\" All rights reserved.
4 .\"
5 .TH Path.copy_to 3 2026-03-16 "Tomo man-pages"
6 .SH NAME
7 Path.copy_to \- copy a file or directory
8 .SH LIBRARY
9 Tomo Standard Library
10 .SH SYNOPSIS
11 .nf
12 .BI Path.copy_to\ :\ func(path:\ Path,\ dest:\ Path,\ overwrite\ =\ no\ ->\ Result)
13 .fi
14 .SH DESCRIPTION
15 Copies the file or directory from one location to another. This is the same behavior as `cp -r -T src dest` or `cp -rf -T src dest` (if `overwrite` is enabled).
18 .SH ARGUMENTS
20 .TS
21 allbox;
22 lb lb lbx lb
23 l l l l.
24 Name Type Description Default
25 path Path The path to copy. -
26 dest Path The destination to copy the path to. -
27 overwrite Whether to permit overwriting the destination if it is an existing file or directory. no
28 .TE
29 .SH RETURN
30 Either `Success` or `Failure(reason)`.
32 .SH EXAMPLES
33 .EX
34 (./file.txt).move(/tmp/renamed.txt)!
35 .EE
36 .SH SEE ALSO
37 .BR Tomo-Path (3)