MCPcopy Create free account
hub / github.com/error311/FileRise / write

Method write

src/FileRise/Storage/WebDavAdapter.php:222–233  ·  view source on GitHub ↗
(string $path, string $data, int $flags = 0)

Source from the content-addressed store, hash-verified

220 }
221
222 public function write(string $path, string $data, int $flags = 0): bool
223 {
224 if (!$this->ensureParentExists($path)) {
225 return false;
226 }
227 $url = $this->buildUrlForPath($path);
228 if ($url === '') {
229 return false;
230 }
231 $status = $this->request('PUT', $url, $data, []);
232 return $status >= 200 && $status < 300;
233 }
234
235 public function writeStream(string $path, $stream, ?int $length = null, ?string $mimeType = null): bool
236 {

Callers 1

checkMethod · 0.45

Calls 3

ensureParentExistsMethod · 0.95
buildUrlForPathMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected