From 35e98e601838281fe36e845cae32d34b5073a488 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 9 Jun 2018 11:41:48 +0200 Subject: [PATCH] [Filesystem] Improved the code of an example --- components/filesystem.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/filesystem.rst b/components/filesystem.rst index 410b505cd0c..a9deacfc2be 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -34,7 +34,7 @@ endpoint for filesystem operations:: $fileSystem = new Filesystem(); try { - $fileSystem->mkdir('/tmp/random/dir/'.mt_rand()); + $fileSystem->mkdir(sys_get_temp_dir().'/'.random_int(0, 1000)); } catch (IOExceptionInterface $exception) { echo "An error occurred while creating your directory at ".$exception->getPath(); }