Example #1
0
 public static function create($path)
 {
     Filesystem::checkWriteSafety(dirname($path));
     if (file_exists($path) && !is_dir($path)) {
         throw new FilesystemException("A file already exists in the location of [{$path}]");
     }
     if (!file_exists($path)) {
         mkdir($path);
     }
     return new Directory($path);
 }