public function importFile($localPath, FileInterface $folder = null)
    {
        if(!$folder->isDir()){
            throw new RuntimeException('Files can only be moved into directories');
        }
        //$fileName = $uploadedFile->getClientOriginalName();

        $fileName = basename($localPath);

        $targetPath = $folder ? $folder->getPath() . "$fileName" : $fileName;

        $this->files->move($localPath, $targetPath);

        $absPath = $this->mapper->absolutePath($targetPath);

        $file = $this->createFromPath($targetPath);

        if ($folder) {
            $file->setDir($folder);
            $folder->addChild($file);
        }

        $this->save($file);

        return $file;
    }