Tidypics current hurdles

When using the delete() function on a file resource, the file entity is deleted, but the actual file resource is not. This means that when deleting images, the entity deletes, but the image is still in the directory. I need this to be fixed in order for this plugin to officially work.

Secondly, does anyone have any ideas on how to delete a folder from within a users data file directory. Or even where to get the path to a users file directory. Reason is my albums create their own folders that contain all images belonging to that album. So ann easy way to delete an entire album is to just delete the entire folder.

  • If this is the correct answer, it'll be my 1st contribution to elgg :)

    Elgg creates user directories in the data folder based on the 1st 5 letters of "username".

    Path to "username" would be:

    elggdata/u/s/e/r/n/username/

     

  • Always great to see contributions, keep it up!  Thanks for the help.
    I looked into how the directory structure is handled, I just thought thought there may be a function or something that automatically grabs the users path. For example to get a user's name its $entity->username , so just thought maybe there would be something like that for path_to_directory. =D

    Actually your advice is easy enough, I should just hard code it for now ... thanks for bringing this to my attention.