MSFDirAssetPackage
Objective-C
@interface MSFDirAssetPackage : MSFAssetPackage
Swift
class MSFDirAssetPackage : MSFAssetPackage
An asset package based on a file system directory. Assets are read directly from the directory, thus the assets can be modified on the fly without repackaging them into a ZIP archive. This is mostly useful for style development. Note: assets and directories with names starting with ‘.’ are ignored.
-
Constructs a directory asset package from the specified directory.
Declaration
Objective-C
- (id)initWithDirPath:(NSString *)dirPath;Swift
init!(dirPath: String!)Parameters
dirPathThe full path of the directory containing the assets. @throws NSException If the directory could not be opened.
-
Constructs a directory asset package from the specified directory and a fallback asset package.
Declaration
Objective-C
- (id)initWithDirPath:(NSString *)dirPath baseAssetPackage:(MSFAssetPackage *)baseAssetPackage;Swift
init!(dirPath: String!, baseAssetPackage: MSFAssetPackage!)Parameters
dirPathThe full path of the directory containing the assets.
baseAssetPackageThe base asset package. If an asset is not found in the directory, base asset package is used. @throws NSException If the directory could not be opened.
-
Returns the full path of the directory containing the assets.
Declaration
Objective-C
- (NSString *)getDirPath;Swift
func getDirPath() -> String!Return Value
The full path of the directory containing the assets.
-
Returns the list of assets stored in the directory, ignoring the base asset package.
Declaration
Objective-C
- (MSFStringVector *)getLocalAssetNames;Swift
func getLocalAssetNames() -> MSFStringVector!Return Value
The list of asset names stored in the directory.
-
Rescans the directory. Use this if assets were added to or removed from the directory after the asset package was created.
Declaration
Objective-C
- (void)reload;Swift
func reload() -
Undocumented
Declaration
Objective-C
- (MSFStringVector *)getAssetNames;Swift
func getAssetNames() -> MSFStringVector! -
Undocumented
Declaration
Objective-C
- (MSFBinaryData *)loadAsset:(NSString *)name;Swift
func loadAsset(_ name: String!) -> MSFBinaryData! -
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()