Futilities/human/lib/cFolderator: Difference between revisions
< Futilities | human | lib
Jump to navigation
Jump to search
(Created page with "{{fmt/title|Human Futilities: <code>cFolderator</code> class}} ==Functions== ===actions=== * DoSearch({{l/same|caMatch}} $om) ===events=== * OnPath({{l/same|caPathPiece}} $op)...") |
No edit summary |
||
Line 6: | Line 6: | ||
* OnPath({{l/same|caPathPiece}} $op) | * OnPath({{l/same|caPathPiece}} $op) | ||
* OnFolder({{l/same|caPathNamed}} $op) | * OnFolder({{l/same|caPathNamed}} $op) | ||
* OnWantedFolder({{l/same|caPathPiece}} $op) | |||
* OnFile({{l/same|caPathNamed}} $op) | |||
===state=== | |||
* <code>protected function ResetCount() { $this->nFi = 0; $this->nFo = 0; }</code> | |||
* <code>protected function IncFiles() { $this->nFi++; }</code> | |||
* <code>protected function IncFolders() { $this->nFo++; }</code> | |||
* <code>protected function SummarizeCount() : string { ... }</code>: returns a string summarizing file & folder counts | |||
* <code>protected function ShortCount() : string { ... }</code>: like SummarizeCount(), but shorter string ("fo:#/fi:#") | |||
===object=== | |||
This pair sets and returns a Matcher object: | |||
* <code>protected function SetMatcher({{l/same|caMatch}} $om) { $this->om = $om; }</code> | |||
** This is only called from DoSearch(). | |||
* <code>protected function GetMatcher() : {{l/same|caMatch}} { return $this->om; }</code> |
Revision as of 15:48, 24 September 2022
Human Futilities:
cFolderator class |
Functions
actions
- DoSearch(caMatch $om)
events
- OnPath(caPathPiece $op)
- OnFolder(caPathNamed $op)
- OnWantedFolder(caPathPiece $op)
- OnFile(caPathNamed $op)
state
protected function ResetCount() { $this->nFi = 0; $this->nFo = 0; }
protected function IncFiles() { $this->nFi++; }
protected function IncFolders() { $this->nFo++; }
protected function SummarizeCount() : string { ... }
: returns a string summarizing file & folder countsprotected function ShortCount() : string { ... }
: like SummarizeCount(), but shorter string ("fo:#/fi:#")
object
This pair sets and returns a Matcher object: