2026/07/16
< 2026
|
Thursday, July 16, 2026 (#197)
|
|
References |
Main Work
Ferreteria FileSys stuff in order to support sftp in FTM
The past few days have been work on trying to integrate #phpseclib's Stream class into Ferreteria's stream-handling classes, because their SFTP class doesn't present an API for file I/O beyond sending or receiving entire files.
One conclusion: a Stream ($OStream) should not be a property of a Node but of a Fil, because it corresponds to file-data, not folder-data. ...although I see no harm in having the property available in Node but actually be a shortcut to Node->OFilOps. In general, having a controller-object provide API shortcuts to appropriate sub-objects seems like good practice.
Some complicated restructuring is needed.
SecLib(objA) expectsLocal(objB) to have anOServerproperty, because objA was written to wrap phpseclib's Stream class, which is specifically for phpseclib's SFTP functionality.- However, it doesn't make sense for objB to have an
OServer, because it's for local filesystems. - So, what does
OServerdo, anyway? Well, objA uses it to get theEntrydetails for establishing a connection to the remote filesystem when opening a file. - Right now,
Entryhas no podlings -- but I think it's supposed to represent all possibilities for establishing a connection between the code and a filesystem.- It already handles e.g. public-key entry via a variant of its
$OCredproperty. The assumption that Host and Cred objects are needed, however, remains inherent.Entryprovides these objects as its main API; as is, it can't hide situations where they aren't needed.
- It already handles e.g. public-key entry via a variant of its