Index: src/OFData.h ================================================================== --- src/OFData.h +++ src/OFData.h @@ -148,20 +148,18 @@ * @return A new autoreleased OFData */ + (instancetype)dataWithContentsOfFile: (OFString *)path; #endif -#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS) /*! * @brief Creates a new OFData with an item size of 1, containing the data of * the specified URL. * * @param URL The URL to the contents for the OFData * @return A new autoreleased OFData */ + (instancetype)dataWithContentsOfURL: (OFURL *)URL; -#endif /*! * @brief Creates a new OFData with an item size of 1, containing the data of * the string representation. * Index: src/OFData.m ================================================================== --- src/OFData.m +++ src/OFData.m @@ -97,16 +97,14 @@ { return [[[self alloc] initWithContentsOfFile: path] autorelease]; } #endif -#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS) + (instancetype)dataWithContentsOfURL: (OFURL *)URL { return [[[self alloc] initWithContentsOfURL: URL] autorelease]; } -#endif + (instancetype)dataWithStringRepresentation: (OFString *)string { return [[[self alloc] initWithStringRepresentation: string] autorelease];