I am stuck in creating a directory with C++Builder. If you check this here and here, I find examples for my case, but when I try to use them, none of them work for me! For example, the following code for creating a directory, where the edSourcePath->Text
value has been defined.
Unfortunately the documentation is not complete.
try
{
/* Create directory to specified path */
TDirectory::CreateDirectory(edSourcePath->Text);
}
catch (...)
{
/* Catch the possible exceptions */
MessageDlg("Incorrect path", mtError, TMsgDlgButtons() << mbOK, NULL);
return;
}
The error message says TDirectory
is not a class or namespace.
Another question is, how can I pass the source path and directory name by CreateDirectory(edSourcePath->Text)
?