add support for deleting files
git-svn-id: file:///home/svn/framework3/trunk@9398 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
cf4597df3f
commit
4f0ee6d44c
|
@ -377,6 +377,22 @@ function stdapi_fs_ls($req, &$pkt) {
|
|||
}
|
||||
}
|
||||
|
||||
# works
|
||||
if (!function_exists('stdapi_fs_delete_file')) {
|
||||
function stdapi_fs_delete_file($req, &$pkt) {
|
||||
my_print("doing delete\n");
|
||||
$path_tlv = packet_get_tlv($req, TLV_TYPE_FILE_PATH);
|
||||
$path = $path_tlv['value'];
|
||||
|
||||
if ($path && is_file($path)) {
|
||||
@unlink($path);
|
||||
return ERROR_SUCCESS;
|
||||
} else {
|
||||
return ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# works
|
||||
if (!function_exists('stdapi_sys_config_getuid')) {
|
||||
function stdapi_sys_config_getuid($req, &$pkt) {
|
||||
|
|
Loading…
Reference in New Issue