Go to the documentation of this file.
44 for (
Size i = 0; i < positionals.
count(); i++)
47 result =
createFile(positionals[i]->getValue());
#define S_IRUSR
Read permission, owner.
C int errno
The lvalue errno is used by many functions to return error values.
virtual Result exec()
Execute the application.
Result createFile(const String &file) const
Create a new empty file.
#define S_IWUSR
Write permission, owner.
POSIX-compatible application.
const ArgumentContainer & arguments() const
Get program arguments.
void setDescription(const String &desc)
Set program description.
virtual Size count() const
Returns the number of items inside the Vector.
char * strerror(int errnum)
The strerror function maps the number in errnum to a message string.
unsigned int Size
Any sane size indicator cannot go negative.
int creat(const char *path, mode_t mode)
Create a new file or rewrite an existing one.
Result registerPositional(const char *name, const char *description, Size count=1)
Register a positional argument.
CreateFile(int argc, char **argv)
Constructor.
ArgumentParser & parser()
Get program arguments parser.
#define ERROR(msg)
Output an error message.
virtual ~CreateFile()
Destructor.
const Vector< Argument * > & getPositionals() const
Get positional arguments.