Methods Summary | ||
---|---|---|
public
|
#
__construct( )
|
|
public
|
||
public static
|
#
convert_relative_absolute( string $file , string $referent )
Transform relative path into an absolute path
|
|
public
|
#
get_registered_extensions( )
array get_registered_extensions ()
Keys from the return value correspond to the extension type,
values are the classes all implementing the common interface
Compression_Interface
|
|
public
|
||
public
|
#
is_compressed( string $mFile )
bool is_compressed (string)
Checks to see if a file is a compressed archive through a
bit of guestimation
|
|
public
|
||
public
|
||
public static
|
||
protected
|
||
public
|
||
public
|
||
public
|
||
public
|
#
create_directory( string $dir , int $mode = 493, bool $recursive = false )
bool create_directory (string[, int[, bool]])
Creates a directory within the filesystem and will recursively
create parent directories if need be
|
|
public
|
||
public
|
#
stat( string $file )
Gives information about a file
Peforms a stat() request on named file
array(22) {
["owner"]=> string(5) "debug"
["group"]=> string(5) "group"
["uid"]=> int(664)
["gid"]=> int(664)
["size"]=> int(4096)
["file_type"]=> string(3) "dir"
["referent"]=> NULL
["portable"]=> bool(true)
["link"]=> int(0)
["nlinks"]=> int(4)
["permissions"]=> int(16889)
["site_quota"]=> bool(true)
["user_quota"]=> bool(true)
["ctime"]=> int(1242769316)
["mtime"]=> int(1242769316)
["atime"]=> int(1230433552)
["inode"]=> int(2454742)
["can_write"]=> bool(true)
["can_read"]=> bool(true)
["can_execute"]=> bool(true)
["can_chown"]=> bool(true)
["can_chgrp"]=> bool(true)
}
owner: resolved name of the uid
group: resolved name of the gid
uid: numeric user id
gid: numeric group id
size: file size in bytes
file_type: file type, values [dir, file, link]
link: file is symbolic link, 2 if directory, 1 if file
nlinks: number of hardlinks to the file
permissions: file permissions encoded as integer
site_quota: whether the file counts towards the site's quota
user_quota: whether the file counts towards the user's quota
ctime: creation time
mtime: modification time
atime: last access time
inode: filesystem inode
can_write: file has write bit set
can_read: file has read bit set
can_execute: file has execute bit set
can_chown: user privileged to chown()
can_chgrp: user privileged to chgrp()
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
unmake_shadow_path( $path )
Strip shadow prefix from path
Because this is a wrapper to unmake_path,
|
|
public
|
||
public
|
#
delete_backend( array $files , bool $recurse , int $depth = 1 )
bool delete_backend (mixed, [bool = FALSE])
seedelete() |
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
chmod_backend( $mFile , $mMode , $mRecursive )
bool chmod_backend (string, int[, bool = false])
{@link chmod}
|
|
public
|
||
public
|
||
public
|
||
public
|
#
put_file_contents( string $file , string $data , bool $overwrite = true, bool $binary = false )
Write contents to file
privilege |
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
fix_apache_perms_backend( string|array $paths , bool $recursive = false )
Make directories writeable by Web server for use with DAV
|
|
public
|
#
audit( string $path , array $requirements = array ( ), bool $union = true )
Locate files under a given path matching requirements
Requirements:
- user: username
- perm: permissions
- mtime/ctime: modification/creation time.
n > 0, more than n days ago, n < 0, less than n days ago
- name/regex: filename glob/regex match
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public static
|
#
convert_absolute_relative( string $cwd , string $path )
Transform absolute path into relative path
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
#
set_acls( string|array $file , string|null|array $user = NULL, int|string|null $permission = NULL, array $xtra = array ( ) )
Set file access control lists
- user if omitted removes all ACL entries
- permissions may be of the form:
octal (0, 1, 2, 4 and any combo thereof)
or
drwx, d sets default
setting permission null will remove all permissions
- "0" permission will disallow all access for named user
|
|
public
|
#
shadow_buildup( string $path )
Build up shadow layer component wrapper
{@see shadow_buildup_backend}
|
|
public
|
#
shadow_buildup_backend( string $path , string|int $user = 'root', int $perm = 493 )
Build up shadow layer components up to the final piece
|
|
public
|
#
reset_path( string $path , string $user = '', string|int $fileperm = 644, int $dirperm = 755 )
Reset ownership of files in a path
seetakeover_user() |
|
public
|
#
takeover_user( string|int $olduser , string|int $newuser , string $path = '/' )
Recursively convert ownership of files from one user to another
|
|
public
|
||
public
|
Methods inherited from Module\Skeleton\Standard |
---|
__construct() ,
setUserParameters() ,
autoloadModule() ,
__wakeup() ,
_invoke() ,
__debugInfo() ,
getExportedFunctions() ,
_reset() ,
cleanUserParameters() ,
query()
|
Constants Summary | ||
---|---|---|
public
array
|
DEPENDENCY_MAP
|
#
array (
0 => 'siteinfo',
1 => 'diskquota',
)
|
public
int
|
UPLOAD_UID
|
#
99
|
public
string
|
STCACHE_ROOT
|
#
'6666cd76f96956469e7be39d750cc7d9'
|
public
string
|
ACL_MODE_RECURSIVE
|
#
'R'
|
public
string
|
ACL_MODE_DEFAULT
|
#
'd'
|
public
string
|
ACL_NO_RECALC_MASK
|
#
'n'
|
public
string
|
ACL_FLAGS
|
#
'-PRbdkxn'
|
public
string
|
DOWNLOAD_SKIP_LIST
|
#
'/config/file_download_skiplist.txt'
|
public
array
|
LINK_KEYMAP
|
#
array (
'gid' => 1,
'uid' => 1,
'mode' => 1,
'ino' => 1,
)
|
Constants inherited from Module\Skeleton\Standard |
---|
DEPENDENCY_MAP
|
Properties inherited from Module\Skeleton\Standard |
---|
$exportedFunctions ,
$username ,
$password ,
$domain ,
$user_id ,
$group_id ,
$permission_level ,
$session_id ,
$site ,
$site_id
|