mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* elFinder driver for Volume Group.
|
||||
*
|
||||
* @author Naoki Sawada
|
||||
**/
|
||||
class elFinderVolumeGroup extends elFinderVolumeDriver {
|
||||
|
||||
/**
|
||||
* Driver id
|
||||
* Must be started from letter and contains [a-z0-9]
|
||||
* Used as part of volume id
|
||||
*
|
||||
* @var string
|
||||
**/
|
||||
protected $driverId = 'g';
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Extend options with required fields
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->options['path'] = '/';
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
/* INITIALIZATION */
|
||||
/*********************************************************************/
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function init() {
|
||||
$this->options['path'] = '/';
|
||||
return true;
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
/* FS API */
|
||||
/*********************************************************************/
|
||||
|
||||
/*********************** paths/urls *************************/
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
protected function _dirname($path) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _basename($path) {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _joinPath($dir, $name) {
|
||||
return '/' . $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _normpath($path) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _relpath($path) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _abspath($path) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _path($path) {
|
||||
return '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _inpath($path, $parent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************** file stat ********************/
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _stat($path) {
|
||||
if ($path === '/') {
|
||||
return array(
|
||||
'size' => 0,
|
||||
'ts' => time(),
|
||||
'mime' => 'directory',
|
||||
'read' => true,
|
||||
'write' => false,
|
||||
'locked' => true,
|
||||
'hidden' => false
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _subdirs($path) {
|
||||
$dirs = false;
|
||||
if ($path === '/') {
|
||||
return true;
|
||||
}
|
||||
return $dirs;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _dimensions($path, $mime) {
|
||||
return false;
|
||||
}
|
||||
/******************** file/dir content *********************/
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function readlink($path) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _scandir($path) {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _fopen($path, $mode='rb') {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _fclose($fp, $path='') {
|
||||
return true;
|
||||
}
|
||||
|
||||
/******************** file/dir manipulations *************************/
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _mkdir($path, $name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _mkfile($path, $name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _symlink($source, $targetDir, $name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _copy($source, $targetDir, $name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _move($source, $targetDir, $name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _unlink($path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _rmdir($path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _save($fp, $dir, $name, $stat) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _getContents($path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _filePutContents($path, $content) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _checkArchivers() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _chmod($path, $mode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _findSymlinks($path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _extract($path, $arc) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
**/
|
||||
protected function _archive($dir, $files, $name, $arc) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user