Instance Method


Returns the contents of the file at the specified path.


- (NSData *)contentsAtPath:(NSString *)path;



The path of the file whose contents you want.

Return Value

An NSData object with the contents of the file. If path specifies a directory, or if some other error occurs, this method returns nil.

See Also

Related Symbols

- contentsEqualAtPath:andPath:

Returns a Boolean value that indicates whether the files or directories in specified paths have the same contents.

- createFileAtPath:contents:attributes:

Creates a file with the specified content and attributes at the given location.