Module Op.Copy

File copy.

File copy

type t

The type for file copies.

val make_op : id:id -> mark:mark -> created:B0_std.Mtime.Span.t -> ?post_exec:(op -> unit) -> ?k:(op -> unit) -> mode:int -> linenum:int option -> B0_std.Fpath.t -> dst:B0_std.Fpath.t -> op

make_op declares a file copy operation, see the corresponding accessors for the semantics of various arguments.

val make : src:B0_std.Fpath.t -> dst:B0_std.Fpath.t -> mode:int -> linenum:int option -> t

make constructs a bare copy operation.

val get : op -> t

get o is the copy operation o. Raises Invalid_argument if o is not a copy.

val src : t -> B0_std.Fpath.t

src c is the file read for the copy.

val dst : t -> B0_std.Fpath.t

dst c is the written by the copy.

val mode : t -> int

mode c is the mode of the file written by the copy.

val linenum : t -> int option

linenum c is the linumber directive to write at the begining of the destination file (if any).