MDLFile Class Reference
Inherits from | NSObject |
Declared in | MDLFile.h |
Tasks
-
dateAdded
The file added date.
property -
extension
The file extension.
property -
hash
The file hash.
property -
size
The file size.
property -
document
The file document.
property -
+ fileWithDateAdded:extension:hash:size:document:
Creates a
MDLFile
and initializes its date added, extension, hash, and size properties. -
– downloadToFileAtPath:success:failure:
Sends a download file API request using the shared client.
Properties
dateAdded
The file added date.
@property (strong, nonatomic) NSDate *dateAdded
Discussion
The file added date.
Declared In
MDLFile.h
document
The file document.
@property (weak, nonatomic) MDLDocument *document
Discussion
The file document.
Declared In
MDLFile.h
extension
The file extension.
@property (copy, nonatomic) NSString *extension
Discussion
The file extension.
Declared In
MDLFile.h
Class Methods
fileWithDateAdded:extension:hash:size:document:
+ (MDLFile *)fileWithDateAdded:(NSDate *)dateAdded extension:(NSString *)extension hash:(NSString *)hash size:(NSNumber *)size document:(MDLDocument *)document
Parameters
- dateAdded
The date added of the file.
- extension
The extension of the file.
- hash
The hash of the file.
- size
The size of the file.
- document
The document of the file.
Return Value
The newly-initialized file.
Declared In
MDLFile.h
Instance Methods
downloadToFileAtPath:success:failure:
Sends a download file API request using the shared client.
- (void)downloadToFileAtPath:(NSString *)path success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- path
The path to the file to download to.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes no argument.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a download file API request using the shared client.
See Also
Declared In
MDLFile.h