[tahoe-dev] help: how should you tell a web browser what name to use for a file?
Ben Hyde
bhyde at pobox.com
Fri May 9 17:42:10 PDT 2008
On May 9, 2008, at 7:41 PM, Brian Warner wrote:
>> Am I right that the same file may be in multiple directories,
>> presumably under different names?
>
> Yes.
>
>> Am I right that the file it's self has no knowledge of what
>> directories it
>> resides in; i.e. given a file denoted via a capability you can not
>> recover
>> any of it's names.
>
> Yes.
>
>> Am I right that there isn't a canonical denotation of a file, at
>> least not
>> in the public API. Or possibly put another way the r/w capability
>> which
>> denotes a file shouldn't be treated as such?
>
> If convergence is in use, then a given file (to be precise, a given
> sequence
> of bytes) will be transformed into the same immutable file each time
> it is
> uploaded. If a file is uploaded as a mutable file, then each act of
> uploading
> will create a different (and unrelated) mutable file.
Understood
> Does that answer the last question?
I guess my question might have been phrased "If I have a few denotations
of files inside a given grid can I tell if any of them denote the same
file?" I
was presuming that they means to that end would be to map them to the
canonical denotation for the file they denote; but that there isn't
really such
a thing.
...
So, a somewhat irrelevant point: In the WAPI the situation this
thread is
discussing doesn't actually arise. If you show up tabula rasa at the
WAPI
with a capability there is no telling what might be a useful filename
for it.
If you found it in a directory you might as well denote it using the
directory
relative name path name, which includes the filename.
The issue at hand arise if the user is maintaining his own directory/
meta
data structures in which case he is carrying about the file cap. and
assorted
meta data, including the file name.
Still not getting to the meat of the question am I :).
In slight service of that...
On May 9, 2008, at 2:51 PM, zooko wrote:
> We could use two slashes instead of one to make them visually
> different from "name of child within its parent" URLs:
>
> http://tahoebs1.allmydata.com:8123/named/URI%3ACHK%
> 3Awaqatup4yk7dyoosuyaux6vwzu%
> 3Alzoa4c2phsp3x7ws47bofsbihjm5avxqo35qrqscgqvtwrjotyra%3A3%3A10%
> 3A313227//zookostiddlerdemo.html
... I'd advise against the double slash hack; since
I've seen a lot of code in my day that reduces multiple slashes to
single
ones; as multiples are so easily created in shell scripts; e.g. $dir/
$name
- ben
More information about the tahoe-dev
mailing list