public function createFolderJson(Folder $folder)
    {
        $size = self::ICON_SIZE;
        $file = Injector::inst()->get('File');

        return array(
            'id' => $folder->ID,
            'parentID' => $folder->ParentID,
            'title' => $folder->Title,
            'filename' => $folder->Filename,
            'type' => 'folder',
            'extension' => self::FOLDER_EXTENSION,
            'created' => $folder->Created,
            'iconURL' => $folder->getPreviewThumbnail($size, $size)->URL,
            'canEdit' => $folder->canEdit(),
            'canCreate' => $folder->canCreate(),
            'canDelete' => $folder->canDelete(),
            'canUpload' => $folder->canEdit() && $file->canCreate()
        );
    }