getList() публичный Метод

获取目录文件列表
public getList ( string $path = '/' ) : mixed
$path string 查询路径
Результат mixed
Пример #1
0
 /**
  * undocumented function
  *
  * @return void
  * @author apple
  **/
 function test()
 {
     $upyun = new UpYun('liunian-photo', '', '');
     try {
         $list = $upyun->getList('/demo/');
         return $list;
     } catch (Exception $e) {
         return $e->getCode() . $e->getMessage();
     }
 }
Пример #2
0
 public function getList()
 {
     $upyun = new UpYun($this->user['extend']['bucket_name']['value'], SPACEOPERATORS, SPACEOPERATORSPASSWORD);
     try {
         $list = $upyun->getList('/');
         var_dump($list);
     } catch (Exception $e) {
         echo $e->getCode();
         echo $e->getMessage();
     }
 }
Пример #3
0
<?php

require_once '../upyun.class.php';
$upyun = new UpYun('bucket', 'user', 'pwd');
try {
    echo "=========获取目录文件列表\r\n";
    $list = $upyun->getList('/demo/');
    var_dump($list);
    echo "=========DONE\r\n\r\n";
} catch (Exception $e) {
    echo $e->getCode();
    echo $e->getMessage();
}