/** * The constructor. * * @param mixed $path * @param \Illuminate\Filesystem\Filesystem $filesystem */ public function __construct($path, Filesystem $filesystem = null) { $this->path = (string) $path; $this->filesystem = $filesystem ?: new Filesystem(); $this->attributes = Collection::make($this->getAttributes()); }