Platforms to show: All Mac Windows Linux Cross-Platform
Back to FolderItem class.
FolderItem.MacMoveObjectMBS(DestinationFolder as folderitem, DestinationName as string, byref Result as folderitem, Options as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacClassic Plugin | 9.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The source object can be a file or directory. If a destName is provided then the object will be renamed as well as moved. By default a move across volumes will result in a copy and deletion of the original source. The kFSFileOperationDoNotMoveAcrossVolumes flag will cause cross volume moves to do nothing and return an error.
self: The source object to copy.
DestinationFolder: The destination directory for the copy.
DestinationName: The name for the new object in the destination directory. Pass "" to use the source object name.
result: Upon successful completion a ref to the newly created object. If source is a directory then target will be the corresponding object in the destination directory.
options: One or more FSFileOperation flags
Requires Mac OS X 10.4.
Use this constants:
kFSFileOperationDefaultOptions | 0 | Use the default options - no overwrite, fail if any source item cannot be read, cross volume moves OK. |
kFSFileOperationOverwrite | 1 | Replace an item in the destDir that has the same name as an item being moved/copied there. |
kFSFileOperationSkipSourcePermissionErrors | 2 | Skip items that cannot be read and continue copying/moving instead of failing the operation. |
kFSFileOperationDoNotMoveAcrossVolumes | 4 | Do not perform a copy/delete to move an item across volume boundries - fail the operation instead. |
kFSFileOperationSkipPreflight | 8 | Skip the preflight for a directory move/copy. This will limit the status information that can be returned since the totals will not be calculated. |
Returns a Mac OS error code. Error code -1 is from the plugin for invalid parameters or the function not being availanle.
Some examples using this method:
Blog Entries
The items on this page are in the following plugins: MBS MacClassic Plugin.