Moves this resource so that it is located at the given path.
This is a convenience method, fully equivalent to:
move(destination, force ? FORCE : IResource.NONE, monitor);
This method changes resources; these changes will be reported in a subsequent resource change event that will include an indication that the resource has been removed from its parent and that a corresponding resource has been added to its new parent. Additional information provided with resource delta shows that these additions and removals are related.
This method is long-running; progress and cancellation are provided by the given progress monitor.
@param destination the destination path
@param force a flag controlling whether resources that are notin sync with the local file system will be tolerated
@param monitor a progress monitor, or
null
if progressreporting is not desired
@exception CoreException if this resource could not be moved. Reasons include:
- This resource does not exist.
- This resource or one of its descendents is not local.
- The source or destination is the workspace root.
- The source is a project but the destination is not.
- The destination is a project but the source is not.
- The resource corresponding to the parent destination path does not exist.
- The resource corresponding to the parent destination path is a closed project.
- A resource at destination path does exist.
- A resource of a different type exists at the destination path.
- This resource or one of its descendents is out of sync with the local file system and
force
is false
. - The workspace and the local file system are out of sync at the destination resource or one of its descendents.
- Resource changes are disallowed during certain types of resource change event notification. See
IResourceChangeEvent
for more details. - The source resource is a file and the destination path specifies a project.
@exception OperationCanceledException if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
@see IResourceDelta#getFlags()