nette/nette — pull request #1199 by fabik (2013-08-12 07:55:26+00:00)
Title: FileStorage: set permissions of files and directories

I am still having troubles with issue #1039. It was closed because of umask() problems, but nobody mentioned chmod(). Why cannot FileStorage just get file and directory mode as optional constructor parameters and change file permissions itself?

So, for instance
```php
$storage = new FileStorage($dir, $journal, 0664, 0775);
```
would call chmod(..., 0664) on all created files and mkdir(..., 0775) on created dirs.

There would be no problems with thread safety as in the case of umask(), or am I wrong?