int myqtt_mkdir ( MyQttCtx ctx,
const char *  path,
int  mode 

Allows to create the provided directory by checking and creating all the middle components.

If some of the components fails, the call will return. This call differs from mkdir() in the sense it is able to handle cases like a/b/c

ctxThe context where the operation is taking place.
pathThe path to create
modeThe mode to create each directory component in the route
0 in the case all components in the directory were created, otherwise -1 is returned. Function also returns -1 when path is NULL or mode is less than 0.

References FILE_EXISTS, myqtt_support_build_filename(), and myqtt_support_file_test().

Referenced by myqtt_storage_init_offline(), myqtt_storage_retain_msg_set(), and myqtt_storage_sub_offline().