Trash spec: directory size cache
Alexander Larsson
alexl at redhat.com
Mon Apr 15 12:18:53 PDT 2013
On mån, 2013-04-15 at 18:47 +0200, David Faure wrote:
> It turns out that the trash spec already uses %-encoding: for the path stored
> in the trashinfo file.
>
> So we discussed it a bit more and came up with this update:
>
> Let's not use the desktop entry standard for this, but a simple text format,
> where each line is:
> <size> <mtime> <%-encoded-path>
>
> Technically % encoding is really only necessary for control characters, but if
> we use URL escaping and escape other chars too, who cares, that'll work too.
>
> To resolve the timezone discussion, we'll just use the mtime in number format.
> So the file will look like:
>
> 16950 15803468 Documents
> 2467 15803582 Another_Folder
>
> Due to the clash with the KDE "metadata" file (our earlier attempt at caching
> the size, using INI format), this change of format means we should call it
> something else after all, say:
>
> TRASH_DIR/directorysizes
This seems excellent to me. Simple, efficient, compatible.
More information about the xdg
mailing list