@@ 203-214 (lines=12) @@ | ||
200 | * |
|
201 | * @return array |
|
202 | */ |
|
203 | public static function delFolder($bucket, $folder) |
|
204 | { |
|
205 | if (empty($bucket) || empty($folder)) { |
|
206 | return [ |
|
207 | 'code' => ErrorCode::COSAPI_PARAMS_ERROR, |
|
208 | 'message' => 'bucket or path is empty', ]; |
|
209 | } |
|
210 | ||
211 | $folder = self::normalizerPath($folder, true); |
|
212 | ||
213 | return self::delBase($bucket, $folder); |
|
214 | } |
|
215 | ||
216 | /** |
|
217 | * 更新文件. |
|
@@ 262-273 (lines=12) @@ | ||
259 | * |
|
260 | * @return array |
|
261 | */ |
|
262 | public static function delFile($bucket, $path) |
|
263 | { |
|
264 | if (empty($bucket) || empty($path)) { |
|
265 | return [ |
|
266 | 'code' => ErrorCode::COSAPI_PARAMS_ERROR, |
|
267 | 'message' => 'path is empty', ]; |
|
268 | } |
|
269 | ||
270 | $path = self::normalizerPath($path); |
|
271 | ||
272 | return self::delBase($bucket, $path); |
|
273 | } |
|
274 | ||
275 | /** |
|
276 | * 内部方法, 上传文件. |