| @@ 588-598 (lines=11) @@ | ||
| 585 | * @param string $path |
|
| 586 | * @return string fileID or null |
|
| 587 | */ |
|
| 588 | private static function getFileId($path) { |
|
| 589 | ||
| 590 | $view = new \OC\Files\View('/'.\OCP\User::getUser().'/files'); |
|
| 591 | $fileId = null; |
|
| 592 | $fileInfo = $view->getFileInfo($path); |
|
| 593 | if ($fileInfo) { |
|
| 594 | $fileId = $fileInfo['fileid']; |
|
| 595 | } |
|
| 596 | ||
| 597 | return $fileId; |
|
| 598 | } |
|
| 599 | ||
| 600 | /** |
|
| 601 | * get itemType |
|
| @@ 605-616 (lines=12) @@ | ||
| 602 | * @param string $path |
|
| 603 | * @return string type 'file', 'folder' or null of file/folder doesn't exists |
|
| 604 | */ |
|
| 605 | private static function getItemType($path) { |
|
| 606 | $view = new \OC\Files\View('/'.\OCP\User::getUser().'/files'); |
|
| 607 | $itemType = null; |
|
| 608 | ||
| 609 | if ($view->is_dir($path)) { |
|
| 610 | $itemType = "folder"; |
|
| 611 | } elseif ($view->is_file($path)) { |
|
| 612 | $itemType = "file"; |
|
| 613 | } |
|
| 614 | ||
| 615 | return $itemType; |
|
| 616 | } |
|
| 617 | ||
| 618 | /** |
|
| 619 | * get some information from a given share |
|