Skip to content

Commit

Permalink
Bordering the rediculous
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudis1261 committed Jan 21, 2016
1 parent 35e4405 commit 044a86e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
$iter = new RecursiveDirectoryIterator("music", FilesystemIterator::SKIP_DOTS);

// Iterate over them as usual
$count = 1;
foreach (new RecursiveIteratorIterator($iter) as $item) {
echo $item . PHP_EOL;
echo $count . ": " . $item . PHP_EOL;
$count++;
}
printStatus($iter);
12 changes: 12 additions & 0 deletions iterators/2.3.directoryWallpapers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
require 'functions.inc.php';
// Instantiate the iterator. Skipping Dots
$iter = new RecursiveDirectoryIterator("pictures", FilesystemIterator::SKIP_DOTS);

// Iterate over them as usual
$count = 1;
foreach (new RecursiveIteratorIterator($iter) as $item) {
echo $count . ": " . $item . PHP_EOL;
$count++;
}
printStatus($iter);
12 changes: 12 additions & 0 deletions iterators/2.4.homeDirectory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
require 'functions.inc.php';
// Instantiate the iterator. Skipping Dots
$iter = new RecursiveDirectoryIterator("home", FilesystemIterator::SKIP_DOTS);

// Iterate over them as usual
$count = 1;
foreach (new RecursiveIteratorIterator($iter) as $item) {
echo $count . ": " . $item . PHP_EOL;
$count++;
}
printStatus($iter);
3 changes: 2 additions & 1 deletion php-seven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ docker rm -f php7-cli 2>/dev/null
docker run -it --rm --name php7-cli \
-v "$PWD":/usr/src/myapp \
-v "${HOME}/Music":/usr/src/myapp/music \
-v "${HOME}/Pictures/Wallpapers":/usr/src/myapp/pictures \
-v "${HOME}/Pictures/wallpapers":/usr/src/myapp/pictures \
-v "${HOME}":/usr/src/myapp/home \
-w /usr/src/myapp \
drpain/php-cli:latest php "$@"

0 comments on commit 044a86e

Please sign in to comment.