Platforms to show: All Mac Windows Linux Cross-Platform

Back to CopyFileMBS class.

CopyFileMBS.CopyFile(From as FolderItem, Dest as FolderItem, flags as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacOSX Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Copies files or folders.

Copy a file's data and/or metadata. (Metadata consists of permissions, extended attributes, access control lists, and so forth.)

Recursive Copies When given the kFlagsRecursive flag, copyfile() will use the fts(3) functions to recursively descend into the source file-system object. It then calls copyfile() on each of the entries it finds that way. If a progress event is given the event will be called four times for each directory object, and twice for all other objects. (Each directory will be examined twice, once on entry -- before copying each of the objects contained in the directory -- and once on exit -- after copying each object contained in the directory, in order to perform some final cleanup.)

Returns error code or zero for success.

See also:

Some examples using this method:

CopyFileMBS.CopyFile(From as String, Dest as String, flags as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacOSX Plugin 19.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Copies files or folders.

Copy a file's data and/or metadata. (Metadata consists of permissions, extended attributes, access control lists, and so forth.)

Recursive Copies When given the kFlagsRecursive flag, copyfile() will use the fts(3) functions to recursively descend into the source file-system object. It then calls copyfile() on each of the entries it finds that way. If a progress event is given the event will be called four times for each directory object, and twice for all other objects. (Each directory will be examined twice, once on entry -- before copying each of the objects contained in the directory -- and once on exit -- after copying each object contained in the directory, in order to perform some final cleanup.)

Returns error code or zero for success.

See also:

The items on this page are in the following plugins: MBS MacOSX Plugin.


The biggest plugin in space...