begin // Create a directory. if (CreateDir (EXAMPLE_DIR) != 0) then // Report the error; then terminate. MessageBox ("Unable to create directory.", SEVERE); else // Report success. MessageBox (EXAMPLE_DIR + " was created.", INFORMATION); // Delete the directory. If the directory is not // empty, it is not deleted. if (DeleteDir (EXAMPLE_DIR, ONLYDIR) = 0) then // Report success. MessageBox (EXAMPLE_DIR + " was deleted.", INFORMATION); else MessageBox ("Unable to delete directory.", SEVERE); endif; endif; end; |