-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed system calls and glob function in FileManager #14
base: master
Are you sure you want to change the base?
Conversation
removed glob functions call, system function call and rsync call. Replaced with symfony2 Finder and Filesystem classes
|
||
public function __construct($options) | ||
{ | ||
if (!strlen(trim($options['file_base_path']))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to change the checking for conf parameter in constructor as it is always called before the other functions
Thanks for the pull request! However as written this change will break the syncing of content back to the permanent folder on a later edit of an existing object. Files that are removed from the collection in the editor need to be removed from the permanent folder. The syncFiles() method must do what it promises to do - if we ditch rsync then we must still provide the functionality of rsync. This is an example of code in my project that would break with this change: $fileUploader->syncFiles( |
OK, I will add that :) On 14 November 2012 17:39, Tom Boutell [email protected] wrote:
|
There will almost surely be a performance hit compared to rsync, but I like Make sure the implementation isn't reading entire files into memory. On Wed, Nov 14, 2012 at 11:41 AM, alexandre melard <[email protected]
Tom Boutell |
mirror : I added the possiblity to delete files in the $to directory that are not in the $from directory
new mod will be in FileManagerSF2
Disable files deletion from target by setting the 'delete' option to FALSE Activate the SF2 class in services No shell tools required used only SF2 components
Ok, I have tested the whole, seems OK, I am not yet familiar with the unitary testing in SF2 so I did it old fashioned way... By the way, when using the multipart posting on OSX php make apache SIGSEV I may open an issue to discuss this if you want... I had to switch to my windows box to test your bundle. I may have a look on the FileUpload services later on |
removed glob functions call, system function call and rsync call.
Replaced with symfony2 Finder and Filesystem classes