//
// IPUAppPathManager.h
// IPUMobile
//
// Created by 秋林 on 2019/1/15.
// Copyright © 2019 Asiainfo. All rights reserved.
//
#import <Foundation/Foundation.h>
#define RESROUCE_DIR @"Application"
@interface IPUAppPathManager : NSObject
/*
* 通过相对路径获取工程资源的绝对路径
* e.g Bundle/Application/${RANDOM}/${APP_NAME}
*/
+ (nullable NSString *)getResPath:(nullable NSString *)relativePath;
/*
* 获取外部存储资源的绝对路径
* e.g Data/Application/${RANDOM}/Documents
*/
+ (nullable NSString *)getDocPath:(nullable NSString *)relativePath;
/*
* 从Bundle中获取资源的绝对路径
*/
+ (nullable NSString *)getBundlePath:(nullable NSString *)bundleName
withRelativePath:(nullable NSString *)relativePath;
/* 版本分支一种写法,暂时无用处 */
+ (nullable NSURL *)getDefaultPath;
+ (nullable NSString *)getCacheResourcePath:(nullable NSString *)relativePath;
/* 判断Document目录下文件是否存在 */
+ (BOOL)isDocFileExist:(nullable NSString *)relativePath;
/* 在沙盒目录里,创建指定目录(相对路径)*/
+ (nullable NSString *)createResourcePath:(nullable NSString *)relativeDirPath;
/* 在沙盒目录里,创建指定目录(相对路径)*/
+ (BOOL)createDirectory:(nullable NSString *)absolutePath;
/* 查找Lua脚本资源,Bundle存在:返回Bundle绝对路径+目录,否则返回nil */
+ (nullable NSString *)getBundlePath:(nullable NSString *)bundleName
appendPath:(nullable NSString *)appendPath;
@end
|