How can I create a directory on the file system?

directory, oracle, oracle10g, plsql

Solution

In the end I did find an easier solution. Use

select os_command.exec('mkdir /home/oracle/mydir') from dual;

or simply

x := os_command.exec('mkdir /home/oracle/mydir');

Problem

How do you create a physical directory on the OS from within PL/SQL? I looked at the `CREATE OR REPLACE DIRECTORY` command but that doesn't do it. Neither does `UTL_FILE` appear to be capable.

Original source