Inherits from NSObject
Declared in RKDirectory.h
RKDirectory.m

Overview

iOS and OS X agnostic accessors for safely returning directory paths for use by the framework and applications.

Tasks

  • + applicationDataDirectory

    Returns the path to the Application Data directory for the executing application. On iOS, this is a sandboxed path specific for the executing application. On OS X, this is an application specific path under NSApplicationSupportDirectory (i.e. ~/Application Support).

  • + cachesDirectory

    Returns a path to the root caches directory used by RestKit for storage. On iOS, this is a sanboxed path specific for the executing application. On OS X, this is an application specific path under NSCachesDirectory (i.e. ~/Library/Caches).

  • + ensureDirectoryExistsAtPath:error:

    Ensures that a directory exists at a given path by checking for the existence of the directory and creating it if it does not exist.

Class Methods

applicationDataDirectory

Returns the path to the Application Data directory for the executing application. On iOS, this is a sandboxed path specific for the executing application. On OS X, this is an application specific path under NSApplicationSupportDirectory (i.e. ~/Application Support).

+ (NSString *)applicationDataDirectory

Return Value

The full path to the application data directory.

Declared In

RKDirectory.h

cachesDirectory

Returns a path to the root caches directory used by RestKit for storage. On iOS, this is a sanboxed path specific for the executing application. On OS X, this is an application specific path under NSCachesDirectory (i.e. ~/Library/Caches).

+ (NSString *)cachesDirectory

Return Value

The full path to the Caches directory.

Declared In

RKDirectory.h

ensureDirectoryExistsAtPath:error:

Ensures that a directory exists at a given path by checking for the existence of the directory and creating it if it does not exist.

+ (BOOL)ensureDirectoryExistsAtPath:(NSString *)path error:(NSError **)error

Parameters

path

The path to ensure a directory exists at.

error

On input, a pointer to an error object.

Return Value

A Boolean value indicating if the directory exists.

Declared In

RKDirectory.h