Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 1.8 KB

README.md

File metadata and controls

51 lines (29 loc) · 1.8 KB

Folders

Version License Platform

Usage

Folders is a simple NSFileManager category to be fast with folders..

Basically it creates a folder named with the app bundle identifier inside the Document, Application Support and Caches Directories. This because is more simple to manage some situation. For example if you want to delete the entire content of a directory (with a lot of file...) Folder does it in background but the current directory is clean and ready to use immediately.

To run the example project, clone the repo, and run pod install from the Example directory first.

NSLog(@"Application Support Folder: %@", [NSFileManager fld_applicationSupportFolder]);

NSLog(@"Documents Folder: %@", [NSFileManager fld_documentFolder]);

NSLog(@"Caches Folder: %@", [NSFileManager fld_cachesFolder]);

NSString *folder = [[NSFileManager fld_applicationSupportFolder] stringByAppendingPathComponent:@"Temp"];

BOOL success = [NSFileManager fld_createFolder:folder];

NSLog(@"Created Folder: %@ - Success: %@ ", folder, success ? @"YES" : @"NO");

success = [NSFileManager fld_emptyFolder:folder];

NSLog(@"Empty Folder: %@ - Success: %@ ", folder, success ? @"YES" : @"NO");

Requirements

Installation

Folders is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Folders"

Author

Stefano Zanetti, [email protected]

License

Folders is available under the MIT license. See the LICENSE file for more info.