Filesystem API - Path(path, [fs])

64 views
Skip to first unread message

Kris Kowal

unread,
Aug 31, 2009, 4:51:10 PM8/31/09
to comm...@googlegroups.com
[Changed Topic]

> Also can someone explain to me the reason why Path ctor takes a FS
> object? And an actual use case of this feature, since I can sort of
> see why, I think.

The purpose I had in mind with the optional file system argument on
the Path constructor was for sandboxed file systems. In the Narwhal
implementation, the Path object has no powers of its own but to store
a String and to use the file system API. However, it would be nice if
the Path implementation could be used in a sandbox, such that path
instanceof Path even in the sandbox and no new Path type has to be
instantiated. I'm starting to think this won't be possible unless all
paths are constructed mandatorily with the (string, file) pair since
it would break the confinement principle if Path closed on a default
file system. So, I'm going to withdraw the "fs" argument in the next
draft.

Kris Kowal

Reply all
Reply to author
Forward
0 new messages