/** * @brief store a file * * @return string URI where file was stored */ public function store(FileDescriptorInterface $descriptor) { $contents = $descriptor->contents(); $path = $this->path($descriptor->name()); file_put_contents($path, $contents); return $this->schema() . '://' . $path; }
/** * @brief get the file descriptor * * @return FileDescriptorInterface */ public function fileDescriptor(FileInterface $file) { $this->descriptor->setFile($file); return $this->descriptor; }