@@ -9,10 +9,12 @@ * the packaging of this file. */ #import "OFObject.h" +@class OFString; + /** * \brief A class for storing arbitrary data in an array. * * If you plan to store large hunks of data, you should consider using * OFBigDataArray, which allocates the memory in pages rather than in bytes. @@ -35,19 +37,37 @@ * \param is The size of each element in the OFDataArray * \return A new autoreleased OFDataArray */ + dataArrayWithItemSize: (size_t)is; +/** + * Creates a new OFDataArary with an item size of 1, containing the data of the + * specified file. + * + * \param path The path of the file + * \return A new autoreleased OFDataArray + */ ++ dataArrayWithContentsOfFile: (OFString*)path; + /** * Initializes an already allocated OFDataArray whose items all have the same * size. * * \param is The size of each element in the OFDataArray * \return An initialized OFDataArray */ - initWithItemSize: (size_t)is; +/** + * Initializes an already allocated OFDataArray with an item size of 1, + * containing the data of the specified file. + * + * \param path The path of the file + * \return An initialized OFDataArray + */ +- initWithContentsOfFile: (OFString*)path; + /** * \return The number of items in the OFDataArray */ - (size_t)count;