2026/07/19
|
Sunday, July 19, 2026 (#200)
|
|
References |
Main Work
Ferreteria FileSys stuff in order to support sftp in FTM
Relevant notes: Saturday, Friday, Thursday
The question now is: which of these calls is wrong, i.e. incorrectly passing the buck? Tentatively, I think the answer is IO\Aspect\Connx\Stream\Native\File->ActualOpen(), which should be calling fopen() (either directly or via the Venue).
The Local variant of Venue used to handle this (via FileOpen()), but I think that may be where the problem started; in any case, FileOpen() wasn't part of the Venue interface and it wasn't implemented in the SFTP variant.
Further questions:
- Q: Why aren't all the operations specific to accessing an open node in a
Streamclass instead of in aVenueclass? - Q: Why is
Servera thing? ...or should theNativeStream-clade-family be under aLocalnamespace, if only for organizational clarity?
I'm thinking that maybe what is needed is some clarity around {operations that just need a filespec} (e.g. existence, timestamps) versus {operations on an opened filesys-node} (read/write/position). ...and then there are things which also do I/O, like an opened filesys-node, but are not filesystem entities (most obvious: memory-buffers).
Tentative rules:
- Anything for which a
Venueneeds a filespec should be delegated to aNodeobject that retains the spec -- for which I guess we've been usingIdent. (Time to rename that? Or is it clear enough, and I just keep forgetting?)- One thing about
Ident, though, is that it manages/represents the full URL and contains theVenue, so it would be a scope-conflict to have aVenuespawning anIdentobject. Maybe we want a class that represents "filespec within current Venue"? ...which kinda describesPSpec... but that's just for managing the local filespec, not for doing operations which may be Venue-dependent...- Would it make sense to have
PSpecvariants for eachVenue?- ...or perhaps
PSpecis basically a "Venue-relativeIdent"... but do we want name-mangling ops and node-access ops in the same class, ever? I kinda think not; better would be to have a separate clade-family which has aPSpecobject but handles all the filesystem operations.
- ...or perhaps
- Would it make sense to have
- One thing about
- Anything for which an
Identobject needs an opened node should be in aStreamobject, unless that clashes with otherStreamfunctionality. (If there is a clash, then whatever class we create for it should definitely be related toStreamin some way, since they do have overlapping functionality). - A thought: Maybe
Identshould actually beVenue-relative...?
Just to start with, how about:
- rename
VenuetoVenProto(venue protocol) - create
VenVNode(venue virtual node, i.e. venue-relative filespec operations)- ...or maybe
VenTypeandVenNode? - Q: How does this interact with
Ident? Does it replace it?- A:
Identcurrently manages:USpecandPSpecobjects (created as needed)- filespec-dependent ops (currently deferred to Venue object)
- A:
- This implies the existence of
VenANode, for interaction with actual nodes (I/O, mainly:Stream-stuff).
- ...or maybe
Tentative Rules
custodial map
|
generative map
|
|---|
Thinking this through in narrative form, the above may actually be too elaborate. The following seems more appropriate:
Starting from a URL (
USpec) string:
- The
Nodequasiconstructor creates aNodeobject, which then can create on demand:
- USpec object (parses USpec string, provides PSpec string)
- PSpec object (parses PSpec string, provides filepath calculations)
- VenType object (derived from USpec object's protocol-type)
- VenNode object (has pointer to VenType, uses PSpec)
- The VenNode object can then create on demand:
- Fil object
- Fol object