Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/php
File: elFinderVolumeLocalFileSystem.class.php
/**
[500] Fix | Delete
* Return fake path started from root dir
[501] Fix | Delete
*
[502] Fix | Delete
* @param string $path file path
[503] Fix | Delete
*
[504] Fix | Delete
* @return string
[505] Fix | Delete
* @author Dmitry (dio) Levashov
[506] Fix | Delete
**/
[507] Fix | Delete
protected function _path($path)
[508] Fix | Delete
{
[509] Fix | Delete
return $this->rootName . ($path == $this->root ? '' : $this->separator . $this->_relpath($path));
[510] Fix | Delete
}
[511] Fix | Delete
[512] Fix | Delete
/**
[513] Fix | Delete
* Return true if $path is children of $parent
[514] Fix | Delete
*
[515] Fix | Delete
* @param string $path path to check
[516] Fix | Delete
* @param string $parent parent path
[517] Fix | Delete
*
[518] Fix | Delete
* @return bool
[519] Fix | Delete
* @author Dmitry (dio) Levashov
[520] Fix | Delete
**/
[521] Fix | Delete
protected function _inpath($path, $parent)
[522] Fix | Delete
{
[523] Fix | Delete
$cwd = getcwd();
[524] Fix | Delete
$real_path = $this->getFullPath($path, $cwd);
[525] Fix | Delete
$real_parent = $this->getFullPath($parent, $cwd);
[526] Fix | Delete
if ($real_path && $real_parent) {
[527] Fix | Delete
return $real_path === $real_parent || strpos($real_path, rtrim($real_parent, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR) === 0;
[528] Fix | Delete
}
[529] Fix | Delete
return false;
[530] Fix | Delete
}
[531] Fix | Delete
[532] Fix | Delete
[533] Fix | Delete
[534] Fix | Delete
/***************** file stat ********************/
[535] Fix | Delete
[536] Fix | Delete
/**
[537] Fix | Delete
* Return stat for given path.
[538] Fix | Delete
* Stat contains following fields:
[539] Fix | Delete
* - (int) size file size in b. required
[540] Fix | Delete
* - (int) ts file modification time in unix time. required
[541] Fix | Delete
* - (string) mime mimetype. required for folders, others - optionally
[542] Fix | Delete
* - (bool) read read permissions. required
[543] Fix | Delete
* - (bool) write write permissions. required
[544] Fix | Delete
* - (bool) locked is object locked. optionally
[545] Fix | Delete
* - (bool) hidden is object hidden. optionally
[546] Fix | Delete
* - (string) alias for symlinks - link target path relative to root path. optionally
[547] Fix | Delete
* - (string) target for symlinks - link target path. optionally
[548] Fix | Delete
* If file does not exists - returns empty array or false.
[549] Fix | Delete
*
[550] Fix | Delete
* @param string $path file path
[551] Fix | Delete
*
[552] Fix | Delete
* @return array|false
[553] Fix | Delete
* @author Dmitry (dio) Levashov
[554] Fix | Delete
**/
[555] Fix | Delete
protected function _stat($path)
[556] Fix | Delete
{
[557] Fix | Delete
$stat = array();
[558] Fix | Delete
[559] Fix | Delete
if (!file_exists($path) && !is_link($path)) {
[560] Fix | Delete
return $stat;
[561] Fix | Delete
}
[562] Fix | Delete
[563] Fix | Delete
//Verifies the given path is the root or is inside the root. Prevents directory traveral.
[564] Fix | Delete
if (!$this->_inpath($path, $this->root)) {
[565] Fix | Delete
return $stat;
[566] Fix | Delete
}
[567] Fix | Delete
[568] Fix | Delete
$stat['isowner'] = false;
[569] Fix | Delete
$linkreadable = false;
[570] Fix | Delete
if ($path != $this->root && is_link($path)) {
[571] Fix | Delete
if (!$this->options['followSymLinks']) {
[572] Fix | Delete
return array();
[573] Fix | Delete
}
[574] Fix | Delete
if (!($target = $this->readlink($path))
[575] Fix | Delete
|| $target == $path) {
[576] Fix | Delete
if (is_null($target)) {
[577] Fix | Delete
$stat = array();
[578] Fix | Delete
return $stat;
[579] Fix | Delete
} else {
[580] Fix | Delete
$stat['mime'] = 'symlink-broken';
[581] Fix | Delete
$target = readlink($path);
[582] Fix | Delete
$lstat = lstat($path);
[583] Fix | Delete
$ostat = $this->getOwnerStat($lstat['uid'], $lstat['gid']);
[584] Fix | Delete
$linkreadable = !empty($ostat['isowner']);
[585] Fix | Delete
}
[586] Fix | Delete
}
[587] Fix | Delete
$stat['alias'] = $this->_path($target);
[588] Fix | Delete
$stat['target'] = $target;
[589] Fix | Delete
}
[590] Fix | Delete
[591] Fix | Delete
$readable = is_readable($path);
[592] Fix | Delete
[593] Fix | Delete
if ($readable) {
[594] Fix | Delete
$size = sprintf('%u', filesize($path));
[595] Fix | Delete
$stat['ts'] = filemtime($path);
[596] Fix | Delete
if ($this->statOwner) {
[597] Fix | Delete
$fstat = stat($path);
[598] Fix | Delete
$uid = $fstat['uid'];
[599] Fix | Delete
$gid = $fstat['gid'];
[600] Fix | Delete
$stat['perm'] = substr((string)decoct($fstat['mode']), -4);
[601] Fix | Delete
$stat = array_merge($stat, $this->getOwnerStat($uid, $gid));
[602] Fix | Delete
}
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
if (($dir = is_dir($path)) && $this->options['detectDirIcon']) {
[606] Fix | Delete
$favicon = $path . DIRECTORY_SEPARATOR . $this->options['detectDirIcon'];
[607] Fix | Delete
if ($this->URL && file_exists($favicon)) {
[608] Fix | Delete
$stat['icon'] = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($favicon, strlen($this->root) + 1));
[609] Fix | Delete
}
[610] Fix | Delete
}
[611] Fix | Delete
[612] Fix | Delete
if (!isset($stat['mime'])) {
[613] Fix | Delete
$stat['mime'] = $dir ? 'directory' : $this->mimetype($path);
[614] Fix | Delete
}
[615] Fix | Delete
//logical rights first
[616] Fix | Delete
$stat['read'] = ($linkreadable || $readable) ? null : false;
[617] Fix | Delete
$stat['write'] = is_writable($path) ? null : false;
[618] Fix | Delete
[619] Fix | Delete
if (is_null($stat['read'])) {
[620] Fix | Delete
if ($dir) {
[621] Fix | Delete
$stat['size'] = 0;
[622] Fix | Delete
} else if (isset($size)) {
[623] Fix | Delete
$stat['size'] = $size;
[624] Fix | Delete
}
[625] Fix | Delete
}
[626] Fix | Delete
[627] Fix | Delete
if ($this->options['statCorrector']) {
[628] Fix | Delete
call_user_func_array($this->options['statCorrector'], array(&$stat, $path, $this->statOwner, $this));
[629] Fix | Delete
}
[630] Fix | Delete
[631] Fix | Delete
return $stat;
[632] Fix | Delete
}
[633] Fix | Delete
[634] Fix | Delete
/**
[635] Fix | Delete
* Get stat `owner`, `group` and `isowner` by `uid` and `gid`
[636] Fix | Delete
* Sub-fuction of _stat() and _scandir()
[637] Fix | Delete
*
[638] Fix | Delete
* @param integer $uid
[639] Fix | Delete
* @param integer $gid
[640] Fix | Delete
*
[641] Fix | Delete
* @return array stat
[642] Fix | Delete
*/
[643] Fix | Delete
protected function getOwnerStat($uid, $gid)
[644] Fix | Delete
{
[645] Fix | Delete
static $names = null;
[646] Fix | Delete
static $phpuid = null;
[647] Fix | Delete
[648] Fix | Delete
if (is_null($names)) {
[649] Fix | Delete
$names = array('uid' => array(), 'gid' => array());
[650] Fix | Delete
}
[651] Fix | Delete
if (is_null($phpuid)) {
[652] Fix | Delete
if (is_callable('posix_getuid')) {
[653] Fix | Delete
$phpuid = posix_getuid();
[654] Fix | Delete
} else {
[655] Fix | Delete
$phpuid = 0;
[656] Fix | Delete
}
[657] Fix | Delete
}
[658] Fix | Delete
[659] Fix | Delete
$stat = array();
[660] Fix | Delete
[661] Fix | Delete
if ($uid) {
[662] Fix | Delete
$stat['isowner'] = ($phpuid == $uid);
[663] Fix | Delete
if (isset($names['uid'][$uid])) {
[664] Fix | Delete
$stat['owner'] = $names['uid'][$uid];
[665] Fix | Delete
} else if (is_callable('posix_getpwuid')) {
[666] Fix | Delete
$pwuid = posix_getpwuid($uid);
[667] Fix | Delete
$stat['owner'] = $names['uid'][$uid] = $pwuid['name'];
[668] Fix | Delete
} else {
[669] Fix | Delete
$stat['owner'] = $names['uid'][$uid] = $uid;
[670] Fix | Delete
}
[671] Fix | Delete
}
[672] Fix | Delete
if ($gid) {
[673] Fix | Delete
if (isset($names['gid'][$gid])) {
[674] Fix | Delete
$stat['group'] = $names['gid'][$gid];
[675] Fix | Delete
} else if (is_callable('posix_getgrgid')) {
[676] Fix | Delete
$grgid = posix_getgrgid($gid);
[677] Fix | Delete
$stat['group'] = $names['gid'][$gid] = $grgid['name'];
[678] Fix | Delete
} else {
[679] Fix | Delete
$stat['group'] = $names['gid'][$gid] = $gid;
[680] Fix | Delete
}
[681] Fix | Delete
}
[682] Fix | Delete
[683] Fix | Delete
return $stat;
[684] Fix | Delete
}
[685] Fix | Delete
[686] Fix | Delete
/**
[687] Fix | Delete
* Return true if path is dir and has at least one childs directory
[688] Fix | Delete
*
[689] Fix | Delete
* @param string $path dir path
[690] Fix | Delete
*
[691] Fix | Delete
* @return bool
[692] Fix | Delete
* @author Dmitry (dio) Levashov
[693] Fix | Delete
**/
[694] Fix | Delete
protected function _subdirs($path)
[695] Fix | Delete
{
[696] Fix | Delete
[697] Fix | Delete
$dirs = false;
[698] Fix | Delete
if (is_dir($path) && is_readable($path)) {
[699] Fix | Delete
if (class_exists('FilesystemIterator', false)) {
[700] Fix | Delete
$dirItr = new ParentIterator(
[701] Fix | Delete
new RecursiveDirectoryIterator($path,
[702] Fix | Delete
FilesystemIterator::SKIP_DOTS |
[703] Fix | Delete
FilesystemIterator::CURRENT_AS_SELF |
[704] Fix | Delete
(defined('RecursiveDirectoryIterator::FOLLOW_SYMLINKS') ?
[705] Fix | Delete
RecursiveDirectoryIterator::FOLLOW_SYMLINKS : 0)
[706] Fix | Delete
)
[707] Fix | Delete
);
[708] Fix | Delete
$dirItr->rewind();
[709] Fix | Delete
if ($dirItr->hasChildren()) {
[710] Fix | Delete
$dirs = true;
[711] Fix | Delete
$name = $dirItr->getSubPathName();
[712] Fix | Delete
while ($dirItr->valid()) {
[713] Fix | Delete
if (!$this->attr($path . DIRECTORY_SEPARATOR . $name, 'read', null, true)) {
[714] Fix | Delete
$dirs = false;
[715] Fix | Delete
$dirItr->next();
[716] Fix | Delete
$name = $dirItr->getSubPathName();
[717] Fix | Delete
continue;
[718] Fix | Delete
}
[719] Fix | Delete
$dirs = true;
[720] Fix | Delete
break;
[721] Fix | Delete
}
[722] Fix | Delete
}
[723] Fix | Delete
} else {
[724] Fix | Delete
$path = strtr($path, array('[' => '\\[', ']' => '\\]', '*' => '\\*', '?' => '\\?'));
[725] Fix | Delete
return (bool)glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);
[726] Fix | Delete
}
[727] Fix | Delete
}
[728] Fix | Delete
return $dirs;
[729] Fix | Delete
}
[730] Fix | Delete
[731] Fix | Delete
/**
[732] Fix | Delete
* Return object width and height
[733] Fix | Delete
* Usualy used for images, but can be realize for video etc...
[734] Fix | Delete
*
[735] Fix | Delete
* @param string $path file path
[736] Fix | Delete
* @param string $mime file mime type
[737] Fix | Delete
*
[738] Fix | Delete
* @return string
[739] Fix | Delete
* @author Dmitry (dio) Levashov
[740] Fix | Delete
**/
[741] Fix | Delete
protected function _dimensions($path, $mime)
[742] Fix | Delete
{
[743] Fix | Delete
clearstatcache();
[744] Fix | Delete
return strpos($mime, 'image') === 0 && is_readable($path) && filesize($path) && ($s = getimagesize($path)) !== false
[745] Fix | Delete
? $s[0] . 'x' . $s[1]
[746] Fix | Delete
: false;
[747] Fix | Delete
}
[748] Fix | Delete
/******************** file/dir content *********************/
[749] Fix | Delete
[750] Fix | Delete
/**
[751] Fix | Delete
* Return symlink target file
[752] Fix | Delete
*
[753] Fix | Delete
* @param string $path link path
[754] Fix | Delete
*
[755] Fix | Delete
* @return string
[756] Fix | Delete
* @author Dmitry (dio) Levashov
[757] Fix | Delete
**/
[758] Fix | Delete
protected function readlink($path)
[759] Fix | Delete
{
[760] Fix | Delete
if (!($target = readlink($path))) {
[761] Fix | Delete
return null;
[762] Fix | Delete
}
[763] Fix | Delete
[764] Fix | Delete
if (strpos($target, $this->systemRoot) !== 0) {
[765] Fix | Delete
$target = $this->_joinPath(dirname($path), $target);
[766] Fix | Delete
}
[767] Fix | Delete
[768] Fix | Delete
if (!file_exists($target)) {
[769] Fix | Delete
return false;
[770] Fix | Delete
}
[771] Fix | Delete
[772] Fix | Delete
return $target;
[773] Fix | Delete
}
[774] Fix | Delete
[775] Fix | Delete
/**
[776] Fix | Delete
* Return files list in directory.
[777] Fix | Delete
*
[778] Fix | Delete
* @param string $path dir path
[779] Fix | Delete
*
[780] Fix | Delete
* @return array
[781] Fix | Delete
* @throws elFinderAbortException
[782] Fix | Delete
* @author Dmitry (dio) Levashov
[783] Fix | Delete
*/
[784] Fix | Delete
protected function _scandir($path)
[785] Fix | Delete
{
[786] Fix | Delete
elFinder::checkAborted();
[787] Fix | Delete
$files = array();
[788] Fix | Delete
$cache = array();
[789] Fix | Delete
$dirWritable = is_writable($path);
[790] Fix | Delete
$dirItr = array();
[791] Fix | Delete
$followSymLinks = $this->options['followSymLinks'];
[792] Fix | Delete
try {
[793] Fix | Delete
$dirItr = new DirectoryIterator($path);
[794] Fix | Delete
} catch (UnexpectedValueException $e) {
[795] Fix | Delete
}
[796] Fix | Delete
[797] Fix | Delete
foreach ($dirItr as $file) {
[798] Fix | Delete
try {
[799] Fix | Delete
if ($file->isDot()) {
[800] Fix | Delete
continue;
[801] Fix | Delete
}
[802] Fix | Delete
[803] Fix | Delete
$files[] = $fpath = $file->getPathname();
[804] Fix | Delete
[805] Fix | Delete
$br = false;
[806] Fix | Delete
$stat = array();
[807] Fix | Delete
[808] Fix | Delete
$stat['isowner'] = false;
[809] Fix | Delete
$linkreadable = false;
[810] Fix | Delete
if ($file->isLink()) {
[811] Fix | Delete
if (!$followSymLinks) {
[812] Fix | Delete
continue;
[813] Fix | Delete
}
[814] Fix | Delete
if (!($target = $this->readlink($fpath))
[815] Fix | Delete
|| $target == $fpath) {
[816] Fix | Delete
if (is_null($target)) {
[817] Fix | Delete
$stat = array();
[818] Fix | Delete
$br = true;
[819] Fix | Delete
} else {
[820] Fix | Delete
$_path = $fpath;
[821] Fix | Delete
$stat['mime'] = 'symlink-broken';
[822] Fix | Delete
$target = readlink($_path);
[823] Fix | Delete
$lstat = lstat($_path);
[824] Fix | Delete
$ostat = $this->getOwnerStat($lstat['uid'], $lstat['gid']);
[825] Fix | Delete
$linkreadable = !empty($ostat['isowner']);
[826] Fix | Delete
$dir = false;
[827] Fix | Delete
$stat['alias'] = $this->_path($target);
[828] Fix | Delete
$stat['target'] = $target;
[829] Fix | Delete
}
[830] Fix | Delete
} else {
[831] Fix | Delete
$dir = is_dir($target);
[832] Fix | Delete
$stat['alias'] = $this->_path($target);
[833] Fix | Delete
$stat['target'] = $target;
[834] Fix | Delete
$stat['mime'] = $dir ? 'directory' : $this->mimetype($stat['alias']);
[835] Fix | Delete
}
[836] Fix | Delete
} else {
[837] Fix | Delete
if (($dir = $file->isDir()) && $this->options['detectDirIcon']) {
[838] Fix | Delete
$path = $file->getPathname();
[839] Fix | Delete
$favicon = $path . DIRECTORY_SEPARATOR . $this->options['detectDirIcon'];
[840] Fix | Delete
if ($this->URL && file_exists($favicon)) {
[841] Fix | Delete
$stat['icon'] = $this->URL . str_replace(DIRECTORY_SEPARATOR, '/', substr($favicon, strlen($this->root) + 1));
[842] Fix | Delete
}
[843] Fix | Delete
}
[844] Fix | Delete
$stat['mime'] = $dir ? 'directory' : $this->mimetype($fpath);
[845] Fix | Delete
}
[846] Fix | Delete
$size = sprintf('%u', $file->getSize());
[847] Fix | Delete
$stat['ts'] = $file->getMTime();
[848] Fix | Delete
if (!$br) {
[849] Fix | Delete
if ($this->statOwner && !$linkreadable) {
[850] Fix | Delete
$uid = $file->getOwner();
[851] Fix | Delete
$gid = $file->getGroup();
[852] Fix | Delete
$stat['perm'] = substr((string)decoct($file->getPerms()), -4);
[853] Fix | Delete
$stat = array_merge($stat, $this->getOwnerStat($uid, $gid));
[854] Fix | Delete
}
[855] Fix | Delete
[856] Fix | Delete
//logical rights first
[857] Fix | Delete
$stat['read'] = ($linkreadable || $file->isReadable()) ? null : false;
[858] Fix | Delete
$stat['write'] = $file->isWritable() ? null : false;
[859] Fix | Delete
$stat['locked'] = $dirWritable ? null : true;
[860] Fix | Delete
[861] Fix | Delete
if (is_null($stat['read'])) {
[862] Fix | Delete
$stat['size'] = $dir ? 0 : $size;
[863] Fix | Delete
}
[864] Fix | Delete
[865] Fix | Delete
if ($this->options['statCorrector']) {
[866] Fix | Delete
call_user_func_array($this->options['statCorrector'], array(&$stat, $fpath, $this->statOwner, $this));
[867] Fix | Delete
}
[868] Fix | Delete
}
[869] Fix | Delete
[870] Fix | Delete
$cache[] = array($fpath, $stat);
[871] Fix | Delete
} catch (RuntimeException $e) {
[872] Fix | Delete
continue;
[873] Fix | Delete
}
[874] Fix | Delete
}
[875] Fix | Delete
[876] Fix | Delete
if ($cache) {
[877] Fix | Delete
$cache = $this->convEncOut($cache, false);
[878] Fix | Delete
foreach ($cache as $d) {
[879] Fix | Delete
$this->updateCache($d[0], $d[1]);
[880] Fix | Delete
}
[881] Fix | Delete
}
[882] Fix | Delete
[883] Fix | Delete
return $files;
[884] Fix | Delete
}
[885] Fix | Delete
[886] Fix | Delete
/**
[887] Fix | Delete
* Open file and return file pointer
[888] Fix | Delete
*
[889] Fix | Delete
* @param string $path file path
[890] Fix | Delete
* @param string $mode
[891] Fix | Delete
*
[892] Fix | Delete
* @return false|resource
[893] Fix | Delete
* @internal param bool $write open file for writing
[894] Fix | Delete
* @author Dmitry (dio) Levashov
[895] Fix | Delete
*/
[896] Fix | Delete
protected function _fopen($path, $mode = 'rb')
[897] Fix | Delete
{
[898] Fix | Delete
return fopen($path, $mode);
[899] Fix | Delete
}
[900] Fix | Delete
[901] Fix | Delete
/**
[902] Fix | Delete
* Close opened file
[903] Fix | Delete
*
[904] Fix | Delete
* @param resource $fp file pointer
[905] Fix | Delete
* @param string $path
[906] Fix | Delete
*
[907] Fix | Delete
* @return bool
[908] Fix | Delete
* @author Dmitry (dio) Levashov
[909] Fix | Delete
*/
[910] Fix | Delete
protected function _fclose($fp, $path = '')
[911] Fix | Delete
{
[912] Fix | Delete
return (is_resource($fp) && fclose($fp));
[913] Fix | Delete
}
[914] Fix | Delete
[915] Fix | Delete
/******************** file/dir manipulations *************************/
[916] Fix | Delete
[917] Fix | Delete
/**
[918] Fix | Delete
* Create dir and return created dir path or false on failed
[919] Fix | Delete
*
[920] Fix | Delete
* @param string $path parent dir path
[921] Fix | Delete
* @param string $name new directory name
[922] Fix | Delete
*
[923] Fix | Delete
* @return string|bool
[924] Fix | Delete
* @author Dmitry (dio) Levashov
[925] Fix | Delete
**/
[926] Fix | Delete
protected function _mkdir($path, $name)
[927] Fix | Delete
{
[928] Fix | Delete
$path = $this->_joinPath($path, $name);
[929] Fix | Delete
[930] Fix | Delete
if (mkdir($path)) {
[931] Fix | Delete
chmod($path, $this->options['dirMode']);
[932] Fix | Delete
return $path;
[933] Fix | Delete
}
[934] Fix | Delete
[935] Fix | Delete
return false;
[936] Fix | Delete
}
[937] Fix | Delete
[938] Fix | Delete
/**
[939] Fix | Delete
* Create file and return it's path or false on failed
[940] Fix | Delete
*
[941] Fix | Delete
* @param string $path parent dir path
[942] Fix | Delete
* @param string $name new file name
[943] Fix | Delete
*
[944] Fix | Delete
* @return string|bool
[945] Fix | Delete
* @author Dmitry (dio) Levashov
[946] Fix | Delete
**/
[947] Fix | Delete
protected function _mkfile($path, $name)
[948] Fix | Delete
{
[949] Fix | Delete
$path = $this->_joinPath($path, $name);
[950] Fix | Delete
[951] Fix | Delete
if (($fp = fopen($path, 'w'))) {
[952] Fix | Delete
fclose($fp);
[953] Fix | Delete
chmod($path, $this->options['fileMode']);
[954] Fix | Delete
return $path;
[955] Fix | Delete
}
[956] Fix | Delete
return false;
[957] Fix | Delete
}
[958] Fix | Delete
[959] Fix | Delete
/**
[960] Fix | Delete
* Create symlink
[961] Fix | Delete
*
[962] Fix | Delete
* @param string $source file to link to
[963] Fix | Delete
* @param string $targetDir folder to create link in
[964] Fix | Delete
* @param string $name symlink name
[965] Fix | Delete
*
[966] Fix | Delete
* @return bool
[967] Fix | Delete
* @author Dmitry (dio) Levashov
[968] Fix | Delete
**/
[969] Fix | Delete
protected function _symlink($source, $targetDir, $name)
[970] Fix | Delete
{
[971] Fix | Delete
return $this->localFileSystemSymlink($source, $this->_joinPath($targetDir, $name));
[972] Fix | Delete
}
[973] Fix | Delete
[974] Fix | Delete
/**
[975] Fix | Delete
* Copy file into another file
[976] Fix | Delete
*
[977] Fix | Delete
* @param string $source source file path
[978] Fix | Delete
* @param string $targetDir target directory path
[979] Fix | Delete
* @param string $name new file name
[980] Fix | Delete
*
[981] Fix | Delete
* @return bool
[982] Fix | Delete
* @author Dmitry (dio) Levashov
[983] Fix | Delete
**/
[984] Fix | Delete
protected function _copy($source, $targetDir, $name)
[985] Fix | Delete
{
[986] Fix | Delete
$mtime = filemtime($source);
[987] Fix | Delete
$target = $this->_joinPath($targetDir, $name);
[988] Fix | Delete
if ($ret = copy($source, $target)) {
[989] Fix | Delete
isset($this->options['keepTimestamp']['copy']) && $mtime && touch($target, $mtime);
[990] Fix | Delete
}
[991] Fix | Delete
return $ret;
[992] Fix | Delete
}
[993] Fix | Delete
[994] Fix | Delete
/**
[995] Fix | Delete
* Move file into another parent dir.
[996] Fix | Delete
* Return new file path or false.
[997] Fix | Delete
*
[998] Fix | Delete
* @param string $source source file path
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function