MonobjcMonobjc Documented Class Library
CopyItemAtPathToPathError Method (srcPath, dstPath, error)
NamespacesMonobjc.FoundationNSFileManagerCopyItemAtPathToPathError(NSString, NSString, NSError%)

Copies the directory or file specified in a given path to a different location in the file system identified by another path.

Original signature is '- (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual bool CopyItemAtPathToPathError(
	NSString srcPath,
	NSString dstPath,
	out NSError error
)
Public Overridable Function CopyItemAtPathToPathError ( _
	srcPath As NSString, _
	dstPath As NSString, _
	<OutAttribute> ByRef error As NSError _
) As Boolean
public:
virtual bool CopyItemAtPathToPathError(
	NSString^ srcPath, 
	NSString^ dstPath, 
	[OutAttribute] NSError^% error
)
Parameters
srcPath (NSString)
The path of a file or directory.
dstPath (NSString)
The path of a file or directory.
error (NSError%)
If an error occurs, upon return contains an NSError object that describes the problem. Pass NULL if you do not want error information.
Return Value
YES if the operation was successful. If the operation is not successful, but the delegate returns YES from the fileManager:shouldProceedAfterError:copyingItemAtPath:toPath: message, copyItemAtPath:toPath:error: also returns YES. Otherwise this method returns NO. The method also attempts to make the attributes of the directory or file at dstPath identical to srcPath, but ignores any failure at this attempt.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)