Last active
December 31, 2015 17:19
-
-
Save CMCDragonkai/8019866 to your computer and use it in GitHub Desktop.
PHP: Unique Filenames using Gaufrette
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//works for Gaufrette, but the same principle exists for other filesystem code | |
do{ | |
$name = uniqid('folder', true); | |
if(!$this->filesystem->has($name)) break; | |
}while(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment