2026/05/07
Jump to navigation
Jump to search
|
Thursday, May 7, 2026 (#127)
|
|
References |
FTM update
- 12:29 Trying to figure out a good API/structure for calculating the relative paths that need to be shown in the status.
FSLink->PathTo()does the actual work, but needs to be called from the base link (the start of the relative path); the problem is where to store the base link so we can get to it where needed.- "Where needed" is in [FTM]
Mover->HandleFile(), which (currently) only knows the current Pair, not the base Pair or the base FSLinks. - The obvious solution, now that I write it out, is for Spider (which operates Mover) to call Mover when starting a tree and pass it either one of the base FLinks (by convention, we use the source-link when it doesn't matter which one but everyone has to agree which one is being used).
- 12:36 It turns out that Mover's base-class,
Match, already hasDoStart()andDoFinishmethods,neither of which are called or implementedwhich for some reason are incompletely used (onlyDoFinish()was being called, and both methods are just stubbed off in the base) -- but this is exactly what they should be for. (Do I want to convert them to Events, though, maybe? For now, let's say "no"...) - 12:45 ...except there are two design issues:
- Can't do this outside the glob-loop because we need an actual filespec that will match something, and if we do it inside the glob-loop, then maybe we will need another start/finish pair for outside...
- ...but given that nothing was using that pair anyway, maybe just ditch the whole idea of these methods for now and have one called something like BasePath.
- We also don't have the
FSNodeyet. MaybePathTo()will end up being irrelevant, since we can just do a string-excerpt? (...except then we can't do fancy formatting with the segments, later on...)- ...or maybe we should call it from inside
DoTopFolder(), which is where the FSLink objects (and the Pair object, for that matter) are in fact created.
- ...or maybe we should call it from inside
- Can't do this outside the glob-loop because we need an actual filespec that will match something, and if we do it inside the glob-loop, then maybe we will need another start/finish pair for outside...