public function makeDisk($dir) {

        // Check if the dir refers to an IoC binding and return it
        if ($this->app->bound($dir)
            && ($instance = $this->app->make($dir))
            && (is_a($instance, 'League\Flysystem\Filesystem')
                || is_a($instance, 'League\Flysystem\Cached\CachedAdapter'))
            ) return $instance;

        // Instantiate a new Flysystem instance for local dirs
        return new Filesystem(new Adapter($dir));
    }