LCFileQuery
LCFile 查询类
-
Undocumented
Declaration
Objective-C
+ (instancetype)query;
-
查找一组文件,同步方法
Declaration
Objective-C
- (nullable NSArray *)findFiles:(NSError *_Nullable *_Nullable)error;
Swift
func findFiles() throws -> [Any]
Parameters
error
通常是网络错误或者查找权限未开启
Return Value
返回一组 LCFile 对象
-
查找一组文件,异步方法
See
findFiles:Declaration
Objective-C
- (void)findFilesInBackgroundWithBlock:(nonnull LCArrayResultBlock)resultBlock;
Swift
func findFilesInBackground() async throws -> [Any]
Parameters
resultBlock
回调 block
-
根据 objectId 来查找文件,异步方法
See
getFileWithId:errorDeclaration
Objective-C
- (void)getFileInBackgroundWithId:(nonnull NSString *)objectId block:(nonnull LCFileResultBlock)block;
Swift
func getFileInBackground(withId objectId: String, block: @escaping LCFileResultBlock)
Parameters
objectId
目标文件的 objectId
block
回调 block