@@ -291,10 +291,11 @@ */ + (instancetype)stringWithContentsOfFile: (OFString*)path encoding: (of_string_encoding_t)encoding; #endif +#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS) /*! * @brief Creates a new OFString with the contents of the specified URL. * * If the URL's scheme is file, it tries UTF-8 encoding. * @@ -315,10 +316,11 @@ * @param encoding The encoding to assume * @return A new autoreleased OFString */ + (instancetype)stringWithContentsOfURL: (OFURL*)URL encoding: (of_string_encoding_t)encoding; +#endif /*! * @brief Creates a path from the specified path components. * * @param components An array of components for the path @@ -535,10 +537,11 @@ */ - initWithContentsOfFile: (OFString*)path encoding: (of_string_encoding_t)encoding; #endif +#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS) /*! * @brief Initializes an already allocated OFString with the contents of the * specified URL. * * If the URL's scheme is file, it tries UTF-8 encoding. @@ -560,10 +563,11 @@ * @param encoding The encoding to assume * @return An initialized OFString */ - initWithContentsOfURL: (OFURL*)URL encoding: (of_string_encoding_t)encoding; +#endif /*! * @brief Writes the OFString into the specified C string with the specified * encoding. *