summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_shell.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-26 21:12:11 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-26 21:12:11 -0400
commit4d0cd362e0c796f4c287ddee912dc6af2a12e99d (patch)
treeda989fe21c599d289ff26ac55a7ab7baca6c1c09 /pts-core/functions/pts-functions_shell.php
parent922ea9ae33c02b1fd5d1b2e98fe3c7175c9e64ff (diff)
downloadphoronix-test-suite-upstream-4d0cd362e0c796f4c287ddee912dc6af2a12e99d.tar.gz
phoronix-test-suite-upstream-4d0cd362e0c796f4c287ddee912dc6af2a12e99d.tar.xz
phoronix-test-suite-upstream-4d0cd362e0c796f4c287ddee912dc6af2a12e99d.zip
pts-core: Add pts_move_file() function for moving a file that abstracts
the shell_exec command
Diffstat (limited to 'pts-core/functions/pts-functions_shell.php')
-rw-r--r--pts-core/functions/pts-functions_shell.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_shell.php b/pts-core/functions/pts-functions_shell.php
index 707082a..d0cc1e3 100644
--- a/pts-core/functions/pts-functions_shell.php
+++ b/pts-core/functions/pts-functions_shell.php
@@ -81,5 +81,9 @@ function pts_copy($from, $to)
copy($from, $to);
}
}
+function pts_move_file($from, $to, $change_directory = "")
+{
+ return shell_exec("cd " . $change_directory . " && mv " . $from . " " . $to);
+}
?>