@@ 81-94 (lines=14) @@ | ||
78 | /** |
|
79 | * {@inheritdoc} |
|
80 | */ |
|
81 | public function read($path) |
|
82 | { |
|
83 | if (!$item = $this->getItemByPath($path)) { |
|
84 | return false; |
|
85 | } |
|
86 | ||
87 | if (!$this->checkAccessControl($item, self::CAN_DOWNLOAD)) { |
|
88 | return false; |
|
89 | } |
|
90 | ||
91 | $contents = $this->client->getItemContents($item['Id']); |
|
92 | ||
93 | return $this->mapItemInfo($item, Util::dirname($path), $contents); |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * {@inheritdoc} |
|
@@ 281-297 (lines=17) @@ | ||
278 | /** |
|
279 | * {@inheritdoc} |
|
280 | */ |
|
281 | public function readAndDelete($path) |
|
282 | { |
|
283 | if (!$item = $this->getItemByPath($path)) { |
|
284 | return false; |
|
285 | } |
|
286 | ||
287 | if (!$this->checkAccessControl($item, self::CAN_DOWNLOAD) || |
|
288 | !$this->checkAccessControl($item, self::CAN_DELETE_CURRENT_ITEM)) { |
|
289 | return false; |
|
290 | } |
|
291 | ||
292 | $itemContents = $this->client->getItemContents($item['Id']); |
|
293 | ||
294 | $this->delete($path); |
|
295 | ||
296 | return $itemContents; |
|
297 | } |
|
298 | ||
299 | /** |
|
300 | * Returns ShareFile client. |