The Boolean parameters of these class methods make their calls hard to read:
TSimpleDirEnumerator.Execute: _IncludePath, _Sort, _Recursive, _HandleHiddenTSimpleDirEnumerator.EnumFilesOnly (3 overloads): _IncludePath, _Sort, _HandleHidden, and _Recursive except in the one with the callbackTSimpleDirEnumerator.EnumDirsOnly (2 overloads): _IncludePath, _Sort, _HandleHiddenA call like this says nothing about what it asks for ([bugs:#80] adds it to DUnitFolderIterator), and swapped arguments still compile:
TSimpleDirEnumerator.EnumFilesOnly(Mask, list, True, True, False, True);
Replace the Booleans with enum parameters or with a set of enums. u_dzFileUtils already has examples of both:
TCopyDirCreateIntermediate (cdciCreateIntermediate, cdciDoNotCreateIntermediate), TCopyFileFlagIfExistsTMoveFileExFlagSet, TCopyFileFlagSetThe new parameters must not make an overload call ambiguous, and they have to compile on Delphi 6. There are about 33 calls in the library, its tests and the demo programs, most of them in u_dzFileUtils and testfileutils.
Bug Reports: #80
Bug Reports: #98
Bug Reports: #99
Feature Requests: #41
Implemented in revision [r2527].
Related
Commit: [r2527]