NAME

bdir - directory utilities

SYNOPSIS

#include <basic/string.h>

bchdir(str)
struct string *str;

bmkdir(str)
struct string *str;

brmdir(str)
struct string *str;

DESCRIPTION

Bchdir changes the current working directory (see chdir(2)) to the directory given by the string pointed to by str.  Files referenced with path names that do not begin with / are located relative to the current working directory.  After the current working directory is changed, the new directory is used as the base for all relative path names for this process and any processes it creates.  This function implements the CHDIR statement. 

Bmkdir creates a new directory with the name given by the string pointed to by str.  This function implements the MKDIR statement. 

Brmdir removes the directory with the name given by the string pointed to by str.  This function implements the RMDIR statement. 

SEE ALSO

chdir(stmt), mkdir(stmt), rmdir(stmt)
mkdir(1), rmdir(1), chdir(2) in the UNIX Programmerís Manual

DIAGNOSTICS

These functions generate error 5 (Illegal function call) if anything goes wrong. 

WARNING

Under UNIX, a directory may be created or removed by the superuser only.  Bmkdir and brmdir must be run by the superuser or by a superuser set-user-id program.  These alternatives give unrestrained power to the entire program and may have painful side effects if the program has any bugs.  These functions are made available for compatibility only.  A wiser solution is to call the UNIX utilities mkdir(1) and rmdir(1) from within the program.  The power to manipulate directories will be acquired, but only while it is needed. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber