Skip to content

Commit dd6e66c

Browse files
committed
Add documentation about the exists method
1 parent 5a55dfa commit dd6e66c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎components/filesystem.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,25 @@ default mode value `0777`. You can use the second argument to set your own mode.
5252
$fs->mkdir('/tmp/photos', 0700);
5353

5454

55+
.. note::
56+
57+
You can pass an array or any :phpclass:`\\Traversable` object as the first
58+
argument.
59+
60+
61+
Exists
62+
~~~~~~
63+
64+
Exists checks the presence of all files or directories and return false if a
65+
file is missing.
66+
67+
// this directory exists, return true
68+
$fs->exists('/tmp/photos');
69+
70+
// rabbit.jpg exists, bottle.png does not exists, return false
71+
$fs->exists(array('rabbit.jpg', 'bottle.png));
72+
73+
5574
.. note::
5675

5776
You can pass an array or any :phpclass:`\\Traversable` object as the first

0 commit comments

Comments
 (0)