NMBFileForm Class Reference
NMBFileForm is responsible for collecting information of a file when you want to create or update it.
The content of the file.
@property (nonatomic, copy) NSData *content
The extension of the file.
@property (nonatomic, assign) NSString *extension
Indicates if the file represents a folder.
@property (nonatomic, assign) BOOL isFolder
The convenient method to new a NMBFileForm represents a folder.
+ (instancetype)folderWithName:(NSString *)name
The name of the folder.
Initializes the receiver with the new name the related file is supposed to be renamed to.
+ (instancetype)rename:(NSString *)name file:(NMBFile *)file
The new name of the related file.
The file need to be renamed.
An instance of NMBFileForm has same properties with original file except the name.
When you want to update a file, this method help you to copy all properties of the file conveniently.
- (instancetype)initWithFile:(NMBFile *)file
The source file.
An instance of NMBFileForm has same properties with source file.
If the file content you want to upload is on the disk, you can use this method to avoid unnecessary memory cost.
- (BOOL)setContentViaURL:(NSURL *)fromURL
The file url of the content on the disk.
Whether the file content is successfully to be set.