}
function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) {
+ $path = untrailingslashit($path);
+ if ( empty($path) )
+ return false;
+
if ( ! $this->ftp->mkdir($path) )
return false;
if ( ! $chmod )
$struc['files'] = array();
}
+ // Replace symlinks formatted as "source -> target" with just the source name
+ if ( $struc['islink'] )
+ $struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] );
+
$ret[ $struc['name'] ] = $struc;
}
return $ret;
$this->ftp->quit();
}
}
-
-?>