MBFileDeleteOperation Class Reference
| Inherits from | NSOperation |
|---|---|
| Declared in | MBFilesystemOperations.h |
Overview
An NSOperation subclass that can be used to delete a file from the
filesystem.
MBFileDeleteOperation instances are added to NSOperationQueues to be
performed.
The MBFilesystemOperationQueue singleton is available as a convenience
for performing filesystem operations such as this.
Note: This operation does not provide a mechanism to be notified of its success or failure.
Object lifecycle
+ operationForDeletingFile:
Creates a new MBFileDeleteOperation instance that can be used to delete a
file from the filesystem.
+ (nonnull instancetype)operationForDeletingFile:(nonnull NSString *)pathParameters
path |
The filesystem path of the file to be deleted by the returned operation. |
|---|
Return Value
The newly-created MBFileDeleteOperation instance.
Discussion
Note: The file at the specified path will be moved out-of-place
immediately on the calling thread, but the deletion won’t occur
until the operation is executed by the NSOperationQueue to which
it was added.
Declared In
MBFilesystemOperations.h
– initWithFilePath:
Initializes the receiver so it can be used to delete the specified file.
- (nonnull instancetype)initWithFilePath:(nonnull NSString *)pathParameters
path |
The filesystem path of the file to be deleted. |
|---|
Return Value
The receiver.
Discussion
Note: The file at the specified path will be moved out-of-place
immediately on the calling thread, but the deletion won’t occur
until the operation is executed by the NSOperationQueue to which
it was added.
Declared In
MBFilesystemOperations.h
– initWithFilePath:moveImmediately:
Initializes the receiver so it can be used to delete the specified file.
- (nonnull instancetype)initWithFilePath:(nonnull NSString *)path moveImmediately:(BOOL)moveNowParameters
path |
The filesystem path of the file to be deleted. |
|---|---|
moveNow |
If |
Return Value
The receiver.
Declared In
MBFilesystemOperations.h
Getting information about the operation
filePath
Returns the filesystem path of the file to be deleted by the operation.
@property (nonnull, nonatomic, readonly) NSString *filePathDeclared In
MBFilesystemOperations.h