0.7.12.5 (Icons)
This commit is contained in:
@@ -4,8 +4,16 @@
|
||||
// Polyfill
|
||||
// Fill a volume with many small files
|
||||
|
||||
$dmg = "/Users/".get_current_user()."/Desktop/Polyfill.sparsebundle";
|
||||
if (file_exists($dmg)) {
|
||||
exec("trash ".$dmg."; umount -f /Volumes/Polyfill");
|
||||
}
|
||||
exec("hdiutil create -size 5g -fs HFS+ -type SPARSEBUNDLE -volname Polyfill -attach ".$dmg);
|
||||
|
||||
$base = "/Volumes/Polyfill";
|
||||
$total = 10000;
|
||||
//$total = 10000;
|
||||
$total = 2000;
|
||||
$sample_files = glob("sample_files/*.*");
|
||||
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
|
||||
@@ -35,8 +43,13 @@ for ($i = 0; $i < $total; $i++) {
|
||||
}
|
||||
|
||||
echo $dest."\n";
|
||||
copy("test.jpg",$dest.".jpg");
|
||||
|
||||
$use = $sample_files[rand(0,count($sample_files))];
|
||||
$ext = pathinfo($use, PATHINFO_EXTENSION);
|
||||
copy($use,$dest.".".$ext);
|
||||
//file_put_contents($dest,serialize($levels));
|
||||
}
|
||||
|
||||
exec("open /Volumes/Polyfill");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user