Neos\Flow\ResourceManagement\Streams\StreamWrapperAdapter::rmdir PHP Метод

rmdir() публичный Метод

This method is called in response to rmdir(). Note: In order for the appropriate error message to be returned this method should not be defined if the wrapper does not support creating directories.
public rmdir ( string $path, integer $options ) : boolean
$path string The directory URL which should be removed.
$options integer A bitwise mask of values, such as STREAM_MKDIR_RECURSIVE.
Результат boolean TRUE on success or FALSE on failure.
    public function rmdir($path, $options)
    {
        $this->createStreamWrapper($path);
        return $this->streamWrapper->removeDirectory($path, $options);
    }

Usage Example

 /**
  * @test
  */
 public function rmdirTest()
 {
     $path = 'mockScheme1://foo/bar';
     $options = STREAM_MKDIR_RECURSIVE;
     $this->streamWrapperAdapter->expects($this->once())->method('createStreamWrapper')->with($path);
     $this->mockStreamWrapper->expects($this->once())->method('removeDirectory')->with($path, $options)->will($this->returnValue(true));
     $this->assertTrue($this->streamWrapperAdapter->rmdir($path, $options));
 }