note 68583 added to function.link

From: Date: Wed, 02 Aug 2006 14:16:51 +0000
Subject: note 68583 added to function.link
Groups: php.notes 
Request: Send a blank email to php-notes+get-115483@lists.php.net to get a copy of this message
For a backup utility I needed link-like functionality on a windows system. As it isn't availible on windows, i tried to do it myself with the help of some tools. All you need is junction.exe from sysinternals in your %PATH%. <?php if(!function_exists('link')){ // Assume a windows system function link($target, $link){ if(is_dir($target)){ // junctions link to directories in windows exec("junction $link $target", $lines, $val); return 0 == $val; }elseif(is_file($target)){ // Hardlinks link to files in windows exec("fsutil hardlink create $link $target", $lines, $val); return 0 == $val; } return false; } } ?> http://www.sysinternals.com/Utilities/Junction.html ---- Server IP: 216.194.113.175 Probable Submitter: 86.82.88.85 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.link.php Edit -- https://master.php.net/note/edit/68583 Del: integrated -- https://master.php.net/note/delete/68583/integrated Del: useless -- https://master.php.net/note/delete/68583/useless Del: bad code -- https://master.php.net/note/delete/68583/bad+code Del: spam -- https://master.php.net/note/delete/68583/spam Del: non-english -- https://master.php.net/note/delete/68583/non-english Del: in docs -- https://master.php.net/note/delete/68583/in+docs Del: other reasons-- https://master.php.net/note/delete/68583 Reject -- https://master.php.net/note/reject/68583 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115483) next »