@@ -27,10 +27,12 @@ #import "OFString.h" #ifdef _WIN32 # include #endif + +OF_ASSUME_NONNULL_BEGIN @class OFArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); /*! @@ -67,12 +69,13 @@ * @param program The program to execute. If it does not start with a slash, the * search path specified in PATH is used. * @param arguments The arguments to pass to the program, or nil * @return A new, autoreleased OFProcess. */ -+ (instancetype)processWithProgram: (OFString*)program - arguments: (OFArray OF_GENERIC(OFString*)*)arguments; ++ (instancetype) + processWithProgram: (OFString*)program + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments; /*! * @brief Creates a new OFProcess with the specified program, program name and * arguments and invokes the program. * @@ -81,13 +84,14 @@ * @param programName The program name for the program to invoke (argv[0]). * Usually, this is equal to program. * @param arguments The arguments to pass to the program, or nil * @return A new, autoreleased OFProcess. */ -+ (instancetype)processWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray OF_GENERIC(OFString*)*)arguments; ++ (instancetype) + processWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments; /*! * @brief Creates a new OFProcess with the specified program, program name, * arguments and environment and invokes the program. * @@ -101,15 +105,16 @@ * the environment. If you want to add to the existing * environment, you need to get the existing environment * first, copy it, modify it and then pass it. * @return A new, autoreleased OFProcess. */ -+ (instancetype)processWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray OF_GENERIC(OFString*)*)arguments - environment: (OFDictionary OF_GENERIC(OFString*, - OFString*)*)environment; ++ (instancetype) + processWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments + environment: (nullable OFDictionary + OF_GENERIC(OFString*, OFString*)*)environment; /*! * @brief Initializes an already allocated OFProcess with the specified program * and invokes the program. * @@ -127,11 +132,11 @@ * search path specified in PATH is used. * @param arguments The arguments to pass to the program, or nil * @return An initialized OFProcess. */ - initWithProgram: (OFString*)program - arguments: (OFArray OF_GENERIC(OFString*)*)arguments; + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments; /*! * @brief Initializes an already allocated OFProcess with the specified program, * program name and arguments and invokes the program. * @@ -142,11 +147,11 @@ * @param arguments The arguments to pass to the program, or nil * @return An initialized OFProcess. */ - initWithProgram: (OFString*)program programName: (OFString*)programName - arguments: (OFArray OF_GENERIC(OFString*)*)arguments; + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments; /*! * @brief Initializes an already allocated OFProcess with the specified program, * program name, arguments and environment and invokes the program. * @@ -162,12 +167,13 @@ * first, copy it, modify it and then pass it. * @return An initialized OFProcess. */ - initWithProgram: (OFString*)program programName: (OFString*)programName - arguments: (OFArray OF_GENERIC(OFString*)*)arguments - environment: (OFDictionary OF_GENERIC(OFString*, OFString*)*)environment; + arguments: (nullable OFArray OF_GENERIC(OFString*)*)arguments + environment: (nullable OFDictionary + OF_GENERIC(OFString*, OFString*)*)environment; /*! * @brief Closes the write direction of the process. * * This method needs to be called for some programs before data can be read, @@ -174,5 +180,7 @@ * since some programs don't start processing before the write direction is * closed. */ - (void)closeForWriting; @end + +OF_ASSUME_NONNULL_END