- Tests

  - File has been deleted from filesystem and still exists in Zope [PRIORITY]

    - Possibly the same problem as abandoned-creation

  - File has been deleted from Zope and still exist in filesystem
    (trashcan) [DONE]

  - Purge files older than a certain threshold

  - Edge Cases

    - Two files pointing to the same place. Deleting one should break
      the other if you have non-delete-manual policy

    - Pointing repository to invalid path or to a path not containing
      the files should break the objects

    - When you move files inside plone, files in fs dont move around

    - Use getPhysicalpath() or portal id + relative url for relative policy

  - Populating a path inside a Plone site with stuff from a filesystem
    path [DONE]

    - Path must be one or a subpath of a existing Repository [DONE]

  - Store relative paths + repository in CMFManagedFile [DONE]

  - Compute full path from repository path + relative path [DONE]

  - All combos of creating CMFManagedFile [DONE]

  - All policies  [DONE]

  - manage_beforeDelete for File and trashcan [DONE]

  - Re-sync from filesystem (check if the object exists and don't
    override, or maybe have a policy for overriding) [PRIORITY]

  - Check for orphaned file because repository is gone

  - Functional tests

  - Security tests

    - Constrain repository access to users by checking for permission in
      the repository object.

    - Users that have access to a object get a local role. Hook this to
      the Control Panel ui.

- New features

  - Control Panel entry for managing the tool

    - Configure folder type and file type mapping to be created for
      nested directories (eg: 'Image' for .png, 'File' for .pdf,
     'Document' for .html)

    - Have a default repository be created by default
      (possibly $INSTANCE_HOME/var/$site_physical_path) [DONE]

  - Rename tool to portal_managed_files [DONE]

  - Load a report about orphaned stubs and have checkboxes next to
    each entry (check all/uncheck all) for deletion

    - 'Remove folder if empty' toggle [Note: it already does this and
      it's enabled by default]

  - When deleting repository ask if user wants to delete stubs related
    to that repository

  - A quick Scripted Factory Info that creates a standard Folder and
    populates it from a path [PRIORITY]

  - Dropdown of available paths? Cache paths? Or just a text input?

    - Alan says to choose repository and type
      relative path from repo root into a text input

  - Have some sort of policy for deciding where newly created files go
    by default for a given folder, to possibly get rid of the
    repository dropdown on file add. [PRIORITY]

  - Use file stream iterator with Zope 2.7+ [DONE]

  - Files should have a 'default' policy that uses the repository
    policy. [DONE]

  - i18n?

  - Uploading file should rename object just like in plone

