Skip to main content

mod_dptools: mkdir

About

Creates a directory. Also creates parent directories by default (When they don't exist).

Freeswitch must have write permission in the given path - No error message is send to the log when the path could not be created due to permission problems.

Click here to expand Table of Contents

Usage

mkdir <path>

Examples

<action application="mkdir" data="/path/to/new/directory"/>
<action application="mkdir" data="${recordings_dir}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/"/>
<action application="mkdir" data="/usr/local/freeswitch/sounds/custom/blabla"/>

Permissions

By default new folders create with u=rwx g=r-x a=--- permissions. If you want to change this behaviour, you have to change constant SWITCH_DEFAULT_DIR_PERMS in switch_types.h and recompile.

Alternatives

Create directories with the "system"-tool:

<action application="system" data="/bin/mkdir -p /path/to/new/directory"/>

See Also