function FileUnmanagedDeleteTest::testDirectory
Try deleting a directory.
File
-
modules/
simpletest/ tests/ file.test, line 1427
Class
- FileUnmanagedDeleteTest
- Deletion related tests.
Code
function testDirectory() {
// A directory to operate on.
$directory = $this->createDirectory();
// Try to delete a directory
$this->assertFalse(file_unmanaged_delete($directory), 'Could not delete the delete directory.');
$this->assertTrue(file_exists($directory), 'Directory has not been deleted.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.