course change. If that happens, it will of course require changes to this
extension, until the point at which 8.4 goes final, when only
backwards-compatible changes should occur. Currently it requires a version
-of Tcl 8.4a4 or newer from September 5th 2001 or newer (if it compiles
+of Tcl 8.4a4 or newer from September 7th 2001 or newer (if it compiles
without warning, you should be fine).
Using this extension, the editor Alphatk can actually auto-mount, view and
file copy ftp://ftp.foo.com/pub/readme.txt .
-With 'tkhtml', writing a web-browser in Tcl should be pretty trivial with
-this extension.
+With 'tkhtml' and this extension, writing a web-browser in Tcl should be
+pretty trivial.
None of the vfs's included are 100% complete or optimal yet, so if only for
that reason, code contributions are very welcome. Many of them still
int index;
static char *optionStrings[] = {
- "info", "mount", "unmount",
+ "info", "mount", "unmount", "volumeschanged",
NULL
};
enum options {
- VFS_INFO, VFS_MOUNT, VFS_UNMOUNT
+ VFS_INFO, VFS_MOUNT, VFS_UNMOUNT, VFS_VOLUMESCHANGED,
};
if (objc < 2) {
TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY) == NULL) {
return TCL_ERROR;
}
+ Tcl_FSMountsChanged(&vfsFilesystem);
break;
}
case VFS_INFO: {
path = Tcl_FSGetNormalizedPath(interp, objv[2]);
res = Tcl_UnsetVar2(vfsInterp, "vfs::mount", Tcl_GetString(path),
TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY);
+ if (res == TCL_OK) {
+ Tcl_FSMountsChanged(&vfsFilesystem);
+ }
return res;
}
+ case VFS_VOLUMESCHANGED: {
+ if (objc > 2) {
+ Tcl_WrongNumArgs(interp, 2, objv, NULL);
+ return TCL_ERROR;
+ }
+ Tcl_FSMountsChanged(&vfsFilesystem);
+ }
}
return TCL_OK;
}