% vfs::attributes $mountpoint -state readonly -commit 0where the 'state' and 'commit' names are filesystem specific (but there is a convention that all the filesystem should support 'state'). This is rather like the 'file attributes' command, but operates at the filesystem level rather than the individual file level.In the above example, one can in fact set some of the attributes:
% vfs::attributes $mountpoint -state translucent -commit 1for example.Perhaps we can extend/modify 'file system' to provide this sort of information too? Or perhaps it should all go in a new 'filesystem' command (a core version of 'vfs::filesystem', perhaps).
12Feb03 Brian Theado - I couldn't find this without looking at the source code, so I thought I'd document it here. Of the above, only mk4 and ftp are fully writable vfs's. The rest are readonly.Vince - That's right, and mk4 has configurable writability.NB. There's no reason why the webdav, ns and tar filesystems can't be read-write, if people contribute the code.13feb03 jcw - FWIW, here is a Tcl package to create a ZIP archive from scratch. This does not allow modifying ZIPs, it just writes a fresh one from start to finish:Vince -- you can now configure the writability of mk4 filesystems.
LV May 5, 2003 - on the starkit mailing list today, someone pointed out that read and/or write is not the only thing missing - you can't get permission modes, owner, or group info about a vfs'd file either.There is no portable way to do this - starkits do not track file modes, owners, groups, links. Just names, dates, and sizes... jcwVince: the vfs layer supports the completely general notion of file attributes. It is up to each vfs what attributes they care to manipulate. The vfs can try to replicate what is provided by each native platform (which are different, of course: LV's comment above is very unix-centric), or can create entirely its own set of attributes.LV yes, since I'm using Unix, my comments are Unix-centric. And since the original question came up by someone else on comp.lang.tcl and the starkit mailing list, apparently there are other unix / linux users who also have the same questions...