Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2 what is the best file system abstact layer?

What is the best symfony file system abstract layer ? i need to set up a file system at my symfony project, something similar to dropbox. i dont know where the files/medias are going to be stored or how, so thats why i need that abstract layer, to set it up and dont bother about updateing the files location.

what i need to do:

-adding folders/files
-moveing folder/files to another lcoation
-delating folder/files
-download folder/files
-upload folder/files
-editing folder/files
-editing name of folder/files

do you know any good bundles for it ? any good solutioins for symfony 2 ? and please tell my why can this solution be good for my ?

like image 669
vardius Avatar asked Jan 16 '14 10:01

vardius


People also ask

What is flysystem?

Flysystem is a file storage library for PHP. It provides one interface to interact with many different types of filesystems. When you use Flysystem, you're not only protected from vendor lock-in, you'll also have a consistent experience for which ever storage is right for you.

Which exception is thrown when a directory creation has failed?

An IOException is thrown if directory creation fails.


1 Answers

The currently available options seem to be:

1) Gaufrette

In order to transfer something you need to put it in memory first. This is a problem when you have to deal with huge files. Gaufrette has filesystem abstraction layer, but makes it impossible to move objects between filesystems. Some essential features are also missing, for example - removing a directory.

Feels more like a key-value storage emulator with different adapters.

2) Filicious

On paper seem promising, but in fact its not. The documentation is all wrong. It mentions namespaces that does not exist and classes that are not to be found. Most of the stuff around Filicious currently don't seem to be implemented. The only working adapter as of now is the Local one. You can track the progress on their website.

3) Flysystem

Looks better than the above mentioned. Has stream support. They also have this MountManager, which you can use for transferring files between different filesystems.

In summary, my choice would be Flysystem. You should better check it yourself if it will fit your requirements.

like image 159
Nikola Petkanski Avatar answered Oct 04 '22 02:10

Nikola Petkanski