Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (31 sloc) 0.862 kb
//
// EDStorageManager.h
// storage
//
// Created by Andrew Sliwinski on 6/23/12.
// Copyright (c) 2012 DIY, Co. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "EDStorageOperation.h"
//
#define DEFINE_SHARED_INSTANCE_USING_BLOCK(block) \
static dispatch_once_t pred = 0; \
__strong static id _sharedObject = nil; \
dispatch_once(&pred, ^{ \
_sharedObject = block(); \
}); \
return _sharedObject; \
//
typedef enum
{
kEDStorageDirectoryCache,
kEDStorageDirectoryTemp,
kEDStorageDirectoryDocuments
} Location;
@interface EDStorageManager : NSObject
{
@private NSOperationQueue *queue;
}
+ (EDStorageManager *)sharedInstance;
- (void)persistData:(id)data withExtension:(NSString *)ext toLocation:(Location)location success:(void (^)(NSURL *url, NSUInteger size))success failure:(void (^)(NSError *error))failure;
@end
Jump to Line
Something went wrong with that request. Please try again.