@@ -16,10 +16,12 @@ #import "OFObject.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN +@class OFURL; + /** * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h * * @brief A class for querying information about the system. */ @@ -32,14 +34,13 @@ @property (class, readonly, nonatomic) unsigned short ObjFWVersionMajor; @property (class, readonly, nonatomic) unsigned short ObjFWVersionMinor; @property (class, readonly, nullable, nonatomic) OFString *operatingSystemName; @property (class, readonly, nullable, nonatomic) OFString *operatingSystemVersion; -# ifdef OF_HAVE_FILES -@property (class, readonly, nullable, nonatomic) OFString *userDataPath; -@property (class, readonly, nullable, nonatomic) OFString *userConfigPath; -# endif +@property (class, readonly, nullable, nonatomic) OFURL *userDataURL; +@property (class, readonly, nullable, nonatomic) OFURL *userConfigURL; +@property (class, readonly, nullable, nonatomic) OFURL *temporaryDirectoryURL; @property (class, readonly, nullable, nonatomic) OFString *CPUVendor; @property (class, readonly, nullable, nonatomic) OFString *CPUModel; # if defined(OF_X86_64) || defined(OF_X86) || defined(DOXYGEN) @property (class, readonly, nonatomic) bool supportsMMX; @property (class, readonly, nonatomic) bool supportsSSE; @@ -112,11 +113,10 @@ * * @return The version of the operating system the application is running on */ + (nullable OFString *)operatingSystemVersion; -#ifdef OF_HAVE_FILES /** * @brief Returns the path where user data for the application can be stored. * * On UNIX systems, this adheres to the XDG Base Directory specification.@n * On macOS and iOS, it uses the `NSApplicationSupportDirectory` directory.@n @@ -124,11 +124,11 @@ * On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory.@n * On AmigaOS and MorphOS, it returns `PROGDIR:`. * * @return The path where user data for the application can be stored */ -+ (nullable OFString *)userDataPath; ++ (nullable OFURL *)userDataURL; /** * @brief Returns the path where user configuration for the application can be * stored. * @@ -139,11 +139,11 @@ * On Haiku, it uses the `B_USER_SETTINGS_DIRECTORY` directory. * On AmigaOS and MorphOS, it returns `PROGDIR:`. * * @return The path where user configuration for the application can be stored */ -+ (nullable OFString *)userConfigPath; ++ (nullable OFURL *)userConfigURL; /** * @brief Returns a path where temporary files for can be stored. * * If possible, returns a temporary directory for the user, otherwise returns a @@ -157,12 +157,11 @@ * On Haiku, it uses the `B_SYSTEM_TEMP_DIRECTORY` directory. * On AmigaOS and MorphOS, it returns `T:`. * * @return A path where temporary files can be stored */ -+ (nullable OFString *)temporaryDirectoryPath; -#endif ++ (nullable OFURL *)temporaryDirectoryURL; /** * @brief Returns the vendor of the CPU. * * If the vendor could not be determined, `nil` is returned instead.