mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-12 03:26:50 +01:00
Function added to delete file/dir over FTP
This commit is contained in:
@@ -101,4 +101,15 @@ function ftpPerms($ftpConn, $perms, $filePath) {
|
||||
// Return success status of perms change
|
||||
return ftp_chmod($ftpConn, $perms, $filePath);
|
||||
}
|
||||
|
||||
// Delete dir/file over FTP
|
||||
function ftpDelete($ftpConn, $type, $path) {
|
||||
if ($type == "file") {
|
||||
// Delete our file and return true/false
|
||||
return ftp_delete($ftpConn, $path);
|
||||
} else {
|
||||
// Delete our dir and return true/false
|
||||
return ftp_rmdir($ftpConn, $path);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user