Ferreteria/v0.6/clade/Sys/FileSys/Aspect/Ident/native/SplFile/@notes/2026/06/04
Jump to navigation
Jump to search
| 2026/06/03 | 2026/06/04 | 2026/06/05 |
This was still marginally in use, with the following areas of functionality being defined:
$this->Exists()is powered byfile_exists(), which should have been out-of-scope.$this->Size()is powered bySplFileInfo->getSize()but is now better handled byStat(which is Venue-agnostic).- Provides a slightly-more-granular filespec-parsing, to fill in a couple of gaps left by
parse_url()(wrapped byNodeURLwhich only parses down to the path-level and doesn't break out <path>, <base>, and <ext> from <path/base.ext>.- The <path>/<name.ext> split is now better handled by
PathPiece, which eliminates the need for the following functions:SpecFull()(main value)SpecPath()(fromSplFileInfo->getPath())SpecNameExt()(fromSplFileInfo->getFilename())
- What remains is:
SpecNameCore(), which extracts <base> from <base>.<ext> by removing <ext> from the end ofSplFileInfo->getFilename()SpecExtn(), which extracts <ext> (fromSplFileInfo->getExtension())SpecNameExt(), which extracts <base.ext> (fromSplFileInfo->getFilename())
- The <path>/<name.ext> split is now better handled by
If these were complex operations, it might be worth keeping this clade so as not to implement them, but:
- They are not.
- This implementation assumes that the <ext> should only ever be the characters after the final
., and assumes that any other.are just part of the <base>. This is usually true, but in some cases (e.g..tar.gz) it may be useful to be able to extract all <ext>s in play (e.g. for indexing).
Conclusion: I'm retiring this clade and will manually implement the <base> / <ext> split in NodeURL (which is now a conceptual wrapper and not a native wrapper).