mirror of
https://github.com/danog/file.git
synced 2024-11-30 04:19:39 +01:00
Fix mkdir mode in Driver and implementations (#27)
This commit is contained in:
parent
59d14c779e
commit
7bb476921b
@ -262,7 +262,7 @@ class BlockingDriver implements Driver {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
|
||||
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
|
||||
return new Success((bool) @\mkdir($path, $mode, $recursive));
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ interface Driver {
|
||||
* @param bool $recursive
|
||||
* @return \Amp\Promise
|
||||
*/
|
||||
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise;
|
||||
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise;
|
||||
|
||||
/**
|
||||
* Delete a directory.
|
||||
|
@ -349,7 +349,7 @@ class EioDriver implements Driver {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
|
||||
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
|
||||
$deferred = new Deferred;
|
||||
$this->poll->listen($deferred->promise());
|
||||
|
||||
|
@ -142,7 +142,7 @@ class ParallelDriver implements Driver {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
|
||||
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
|
||||
return new Coroutine($this->runFileTask(new Internal\FileTask("mkdir", [$path, $mode, $recursive])));
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ class UvDriver implements Driver {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
|
||||
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
|
||||
$deferred = new Deferred;
|
||||
$this->poll->listen($deferred->promise());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user