LCFileQuery

Objective-C

@interface LCFileQuery : LCQuery

Swift

class LCFileQuery : LCQuery

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 来查找文件,同步方法

    Declaration

    Objective-C

    - (nullable LCFile *)getFileWithId:(nonnull NSString *)objectId
                                 error:(NSError *_Nullable *_Nullable)error;

    Swift

    func getFileWithId(_ objectId: String) throws -> LCFile

    Parameters

    objectId

    目标文件的 objectId

    error

    通过是网络错误或查找权限未开启

    Return Value

    返回 LCFile 对象

  • 根据 objectId 来查找文件,异步方法

    See

    getFileWithId:error

    Declaration

    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