AEPSource

@interface AEPSource : NSObject

编辑工程资源

  • 资源类型

    Declaration

    Objective-C

    @property (nonatomic, readonly) AEPSourceType type;
  • 资源ID

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *sourceId;
  • 资源路径

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *path;
  • URL

    资源远端地址

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *URL;
  • 资源大小(KB)

    Declaration

    Objective-C

    @property (nonatomic, readonly) size_t size;
  • 是否本地资源

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isLocal;

Creator

  • 创建资源对象

    Declaration

    Objective-C

    + (AEPSource *)SourceWithType:(AEPSourceType)type
                         sourceId:(NSString *)sourceId
                              url:(NSString *)url
                             path:(NSString *)path;

    Parameters

    type

    资源类型

    sourceId

    资源ID,可选

    url

    资源远端地址,可选

    path

    资源本地地址,可选

  • 通过修改本地路径创建资源对象

    Declaration

    Objective-C

    - (AEPSource *)createWithPath:(NSString *)path;

    Parameters

    path

    本地路径

  • 通过修改远程路径创建资源对象

    Declaration

    Objective-C

    - (AEPSource *)createWithURL:(NSString *)URL;

    Parameters

    url

    远端地址

  • 通过资源ID创建资源对象

    Declaration

    Objective-C

    - (AEPSource *)createWithSourceId:(NSString *)sourceId;

    Parameters

    sourceId

    资源ID