8000 Add Filesystem component documentation by romainneutron · Pull Request #1439 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files. 8000
Loading
Diff view
Diff view
Prev Previous commit
Add documentation about the exists method
  • Loading branch information
romainneutron committed Jun 18, 2012
commit dd6e66cb80d14d8445bffa68e4eb898b45d3e4de
19 changes: 19 additions & 0 deletions components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ default mode value `0777`. You can use the second argument to set your own mode.
$fs->mkdir('/tmp/photos', 0700);


.. note::

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


Exists
~~~~~~

Exists checks the presence of all files or directories and return false if a
file is missing.

// this directory exists, return true
$fs->exists('/tmp/photos');

// rabbit.jpg exists, bottle.png does not exists, return false
$fs->exists(array('rabbit.jpg', 'bottle.png));


.. note::

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