Property | Type | Description | |
---|---|---|---|
$disk | |||
$mimeDetect |
Method | Description | |
---|---|---|
__construct ( Dflydev\ApacheMimeTypes\PhpRepository $mimeDetect ) | ||
createDirectory ( $folder ) : string | Create a new directory | |
deleteDirectory ( $folder ) : string | Delete a directory | |
deleteFile ( $path ) : string | Delete a file | |
fileMimeType ( $path ) : null | string | Return the mime type | |
fileModified ( $path ) : Carbon\Carbon | Return the last modified time | |
fileSize ( $path ) | Return the file size | |
fileWebpath ( $path ) : string | Return the full web path to a file | |
folderInfo ( string $folder ) : array | Return files and directories within a folder | |
saveFile ( $path, $content ) : string | Save a file | |
uploadImage ( |
上传图片,返回图片的相对路径 |
Method | Description | |
---|---|---|
breadcrumbs ( $folder ) : array | Return breadcrumbs to current folder | |
cleanFolder ( $folder ) : string | Sanitize the folder name | |
fileDetails ( $path ) : array | Return an array of file details for a file |
public __construct ( Dflydev\ApacheMimeTypes\PhpRepository $mimeDetect ) | ||
$mimeDetect | Dflydev\ApacheMimeTypes\PhpRepository |
protected breadcrumbs ( $folder ) : array | ||
$folder | ||
return | array |
protected cleanFolder ( $folder ) : string | ||
$folder | ||
return | string |
public createDirectory ( $folder ) : string | ||
$folder | ||
return | string |
public deleteDirectory ( $folder ) : string | ||
$folder | ||
return | string |
protected fileDetails ( $path ) : array | ||
$path | ||
return | array |
public fileMimeType ( $path ) : null | string | ||
$path | ||
return | null | string |
public fileModified ( $path ) : Carbon\Carbon | ||
$path | ||
return | Carbon\Carbon |
public fileWebpath ( $path ) : string | ||
$path | ||
return | string |
public folderInfo ( string $folder ) : array | ||
$folder | string | |
return | array | of [ 'folder' => 'path to current folder', 'folderName' => 'name of just current folder', 'breadCrumbs' => breadcrumb array of [ $path => $foldername ] 'folders' => array of [ $path => $foldername] of each subfolder 'files' => array of file details on each file in folder ] |