Inherits from NSObject
Declared in MDLFile.h

Overview

MDLFile represents a document’s file, as described by Mendeley.

Tasks

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

hash

The file hash.

@property (copy, nonatomic) NSString *hash

Discussion

The file hash.

Declared In

MDLFile.h

size

The file size.

@property (strong, nonatomic) NSNumber *size

Discussion

The file size.

Declared In

MDLFile.h

Class Methods

fileWithDateAdded:extension:hash:size:document:

Creates a MDLFile and initializes its date added, extension, hash, and size properties.

+ (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.

Discussion

Creates a MDLFile and initializes its date added, extension, hash, and size properties.

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.

Declared In

MDLFile.h