- function move($source, $destination, $overwrite = false) {
- //Possible to use rename()?
+ /**
+ * @access public
+ *
+ * @param string $source
+ * @param string $destination
+ * @param bool $overwrite
+ * @return bool
+ */
+ public function move($source, $destination, $overwrite = false) {
+ if ( ! $overwrite && $this->exists($destination) )
+ return false;
+
+ // Try using rename first. if that fails (for example, source is read only) try copy.
+ if ( @rename($source, $destination) )
+ return true;
+