Ferreteria/v0.6/clade/Sys/FileSys/Aspect/Ident/spex/PSpecChain/@code/2026/05/27
| 2026/05/26 | 2026/05/27 | 2026/05/28 |
This can't work anymore, without some rewriting.
#
// ++ ACCESS: figuring ++ //
public function FigureRelative(string $fsFull) : QStrIface {
if ($this->HasIt()) {
$fpThis = $this->GetIt();
if (str_starts_with($fsFull,$fpThis)) {
// get the part of $fsFull *after* that base path
$nlThis = strlen($fpThis);
$fpRemain = substr($fsFull,$nlThis);
$qs = QStrClass::FromString($fpRemain);
}
} else {
$qs = QStrClass::AsNew();
}
return $qs;
}
Not sure exactly when these were commented out; possibly the same day. They no longer apply because this is no longer a QStr podling.
#
// ++ ACCESS: QStr ++ //
// USED BY: $this->HasIt()
public function HasStr() : bool {
return $this->OLeaf->HasIt();
}
public function SetStr(string $s) {
echo "MAKING oLink from [$s]".CRLF;
$oLink = FSLinkClass::FromSpec($s);
$this->OLeaf = $oLink;
// 2026-05-06 might need to get the Base Link, but... maybe not? Still reworking FSChain's role...
}
public function &GetStr() : string {
#$this->AmHere();
$qsSpec = $this->QSPath();
#echo $oPath->ReflectThis()->Report();
if ($qsSpec->HasIt()) {
$sSpec = $qsSpec->GetIt();
} else {
echo self::Screen()->ErrorIt('Internal Error').": trying to retrieve path that hasn't been set.".CRLF;
}
return $sSpec;
}
// -- ACCESS -- //