2026/07/18

From WoozleCodes
Jump to navigation Jump to search
Saturday, July 18, 2026 (#199)
Friday Saturday Sunday

References

Main Work

Ferreteria FileSys stuff in order to support sftp in FTM

Relevant notes: Friday, Thursday

Points in favor of merging Server and Entry:

  • Server is basically just a wrapper around Entry, and adds no other functionality.
  • Server is abstract, and therefore never instantiated.
  • Server has only one podling, SSH2
    • ...although that podling itself is at the head of a small tree, but I think this is part of what I'm already trying to remediate?

So, connecting all these notes with the original mission:

  • It doesn't make sense for the Local variant of Venue to have an $OServer property, because it doesn't need one.
  • However, the core Stream library (e.g. SecLib) needs one when opening a remote file.
  • We need some way to regularize this. Obvious solutions:
    • Encapsulate everything that SecLib needs from $OServer into $OServer itself, and have a local variant of $OServer which basically does nothing.
    • Have a local variant of SecLib that doesn't expect an $OServer.

Q: Where is the Stream object created?

A: Fil::$OStream fetches it from Fil::$OVenue->OStream, which means that it's determined by which Venue-class is being instantiated. This in turn is determined by the top-level abstract Venue class looking at the Node's URL (call to static function Venue::FindFromNode()).

...so it looks like all that needs to happen is that Local::$OStream needs to return the native Stream-class (Native) instead of the SecLib SFTP Stream-class.

Done... ok, slight correction: that's not specifically a file class, and also it's abstract. What we need is File.

next problem

  • Fil::ActualOpen() is trying to open ->OStream($fs) which then calls File->ActualOpen() which then tries to access ->FileNode before it has been set.
    • Thing is, Fil already has a Node for the given filespec, so it should be possible to set File->FileNode explicitly after creating the object.
      • ...done.

...and now we have yet another infinite loop:

[WFe]IO/Aspect/Connx/Stream/Native/File.php @  42 \Sys\FileSys\Node\aux\Fil          -> Open
[WFe]IO/Aspect/Connx.php                    @  85 IO\Aspect\Connx\Stream\Native\File -> ActualOpen
[WFe]Sys/FileSys/Node/aux/Fil.php           @ 110 IO\Aspect\Connx                    -> Open
[WFe]IO/Aspect/Connx.php                    @  85 Sys\FileSys\Node\aux\Fil           -> ActualOpen

The fact that Connx line 85's call ends up in two different places is because the object is a different class each time (Fil vs. Native Stream File).