MDLFile Class Reference
| Inherits from | NSObject |
| Declared in | MDLFile.h MDLFile.m |
Tasks
-
dateAddedThe file added date.
property -
extensionThe file extension.
property -
hashThe file hash.
property -
sizeThe file size.
property -
publicURLThe file public URL.
property -
documentThe file document.
property -
+ fileWithDateAdded:extension:hash:size:document:Creates a
MDLFileand initializes its date added, extension, hash, and size properties. -
+ fileWithPublicURL:document:Creates a
MDLFileand initializes its public URL property. -
– downloadToFileAtPath:progress:success:failure:Sends a download file API request using the shared client.
Properties
dateAdded
The file added date.
@property (strong, nonatomic) NSDate *dateAddedDiscussion
The file added date.
Declared In
MDLFile.hdocument
The file document.
@property (weak, nonatomic) MDLDocument *documentDiscussion
The file document.
Declared In
MDLFile.hextension
The file extension.
@property (copy, nonatomic) NSString *extensionDiscussion
The file extension.
Declared In
MDLFile.hhash
The file hash.
@property (copy, nonatomic) NSString *hashDiscussion
The file hash.
Declared In
MDLFile.hClass Methods
fileWithDateAdded:extension:hash:size:document:
+ (MDLFile *)fileWithDateAdded:(NSDate *)dateAdded extension:(NSString *)extension hash:(NSString *)hash size:(NSNumber *)size document:(MDLDocument *)documentParameters
- 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.hfileWithPublicURL:document:
Creates a MDLFile and initializes its public URL property.
+ (MDLFile *)fileWithPublicURL:(NSURL *)publicURL document:(MDLDocument *)documentReturn Value
The newly-initialized file.
Discussion
Creates a MDLFile and initializes its public URL property.
Declared In
MDLFile.hInstance Methods
downloadToFileAtPath:progress:success:failure:
Sends a download file API request using the shared client.
- (AFHTTPRequestOperation *)downloadToFileAtPath:(NSString *)path progress:(void ( ^ ) ( NSUInteger bytesRead , long long totalBytesRead , long long totalBytesExpectedToRead ))progress success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- path
The path to the file to download to.
- progress
A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the
NSHTTPURLResponseobject. This block may be called multiple times, and will execute on the main thread.
- 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
NSErrorobject describing the network or parsing error that occurred.
Return Value
A new HTTP request operation
Discussion
Sends a download file API request using the shared client.
See Also
Declared In
MDLFile.h