directory() public static method

public static directory ( $value, $message = '' )
 /**
  * {@inheritdoc}
  */
 public function __construct($filesystemPath, $path = null)
 {
     Assert::directory($filesystemPath);
     parent::__construct($filesystemPath, $path);
 }
示例#2
0
 /**
  * Sets the directory containing the AsciiDoc pages.
  *
  * @param string $dir The directory that contains the AsciiDoc pages.
  */
 public function setAsciiDocDir($dir)
 {
     Assert::directory($dir);
     $this->asciiDocDir = $dir;
 }
示例#3
0
 /**
  * Creates a new repository.
  *
  * @param string            $baseDir      The base directory of the repository on the file
  *                                        system.
  * @param bool              $symlink      Whether to use symbolic links for added files. If
  *                                        symbolic links are not supported on the current
  *                                        system, the repository will create hard copies
  *                                        instead.
  * @param bool              $relative     Whether to create relative symbolic links. If
  *                                        relative links are not supported on the current
  *                                        system, the repository will create absolute links
  *                                        instead.
  * @param ChangeStream|null $changeStream If provided, the repository will log
  *                                        resources changes in this change stream.
  */
 public function __construct($baseDir = '/', $symlink = true, $relative = true, ChangeStream $changeStream = null)
 {
     parent::__construct($changeStream);
     Assert::directory($baseDir);
     Assert::boolean($symlink);
     $this->baseDir = rtrim(Path::canonicalize($baseDir), '/');
     $this->baseDirLength = strlen($baseDir);
     $this->symlink = $symlink && self::isSymlinkSupported();
     $this->relative = $this->symlink && $relative;
     $this->filesystem = new Filesystem();
 }
 /**
  * Creates a new repository.
  *
  * @param string $baseDir  The base directory of the repository on the file
  *                         system.
  * @param bool   $symlink  Whether to use symbolic links for added files. If
  *                         symbolic links are not supported on the current
  *                         system, the repository will create hard copies
  *                         instead.
  * @param bool   $relative Whether to create relative symbolic links. If
  *                         relative links are not supported on the current
  *                         system, the repository will create absolute links
  *                         instead.
  */
 public function __construct($baseDir = '/', $symlink = true, $relative = true)
 {
     Assert::directory($baseDir);
     Assert::boolean($symlink);
     $this->baseDir = rtrim(Path::canonicalize($baseDir), '/');
     $this->symlink = $symlink && self::isSymlinkSupported();
     $this->relative = $this->symlink && $relative;
     $this->filesystem = new Filesystem();
 }