[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `file-attribute' accessors
From: |
Ted Zlatanov |
Subject: |
Re: `file-attribute' accessors |
Date: |
Mon, 09 Apr 2012 11:46:01 -0400 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.95 (gnu/linux) |
On Mon, 09 Apr 2012 16:40:51 +0200 Lars Magne Ingebrigtsen <address@hidden>
wrote:
LMI> Thierry Volpiatto <address@hidden> writes:
>> Why not keys instead of many accessor functions?
LMI> Because `file-attributes' already has an optional parameter, and one
LMI> sometimes wants to have, say, both the uid and the size, and statting
LMI> the file twice to get that isn't optimal.
I would extend `file-attributes' to take &rest symbols after the extra
format argument, so you could say
(file-attributes FILE nil 'size 'mtime)
And you'd get back a two-element list. I think that's the most concise
approach: it doesn't create a bunch of new functions, scales from one
attribute to N or "just give me all", and is backwards compatible.
Ted
- `file-attribute' accessors, Lars Magne Ingebrigtsen, 2012/04/09
- Re: `file-attribute' accessors, Thierry Volpiatto, 2012/04/09
- Re: `file-attribute' accessors, Lars Magne Ingebrigtsen, 2012/04/09
- Re: `file-attribute' accessors, Thierry Volpiatto, 2012/04/09
- Re: `file-attribute' accessors,
Ted Zlatanov <=
- Re: `file-attribute' accessors, Lars Magne Ingebrigtsen, 2012/04/09
- Re: `file-attribute' accessors, Stefan Monnier, 2012/04/09
- Re: `file-attribute' accessors, Ted Zlatanov, 2012/04/09
- Re: `file-attribute' accessors, Stefan Monnier, 2012/04/09
- Re: `file-attribute' accessors, Miles Bader, 2012/04/10
Re: `file-attribute' accessors, Leo, 2012/04/09