public function importPath($disk, $path) { $directory = File::cleanDirname($path); $filename = pathinfo($path, PATHINFO_FILENAME); $extension = pathinfo($path, PATHINFO_EXTENSION); return $this->import($disk, $directory, $filename, $extension); }
/** * Generate a new media record. * @param string $disk * @param string $path * @return void */ protected function createRecordForFile($disk, $path) { try { $this->uploader->importPath($disk, $path); ++$this->counters['created']; $this->info("Created Record for file at {$path}", 'v'); } catch (MediaUploadException $e) { $this->warn($e->getMessage(), 'vvv'); ++$this->counters['skipped']; $this->info("Skipped file at {$path}", 'v'); } }