the question is how can i create new folder in my filesystem ? I know how to add file, but how to create an empty folder in specified path ?
Symfony2 Gaufrette How to create directory?
3.3k views Asked by vardius At
3
There are 3 answers
0
On
I'm using the Amazon S3 adaptor, and am able to create a directory using the following:
use Gaufrette\Filesystem;
use Gaufrette\Adapter\AwsS3;
use Aws\S3\S3Client;
$s3Service = S3Client::factory(array("key" => "Your Key Here", "secret" => "Your AWS Secret Here" ));
$adapter = new AwsS3($s3Service,"yourBucketNameHere");
$filesystem = new Filesystem($adapter);
$filesystem->write("new-directory-here/", "");
Then you call
write
apapter ensure that directory exist. For example Ftp