It would be good to encapsulate this behavior may be with double dispatch with the platform. Else clients end up to be forced to check. Stef
On 1 Aug 2019, at 21:22, Alistair Grant <akgrant0710@gmail.com> wrote:
On Thu, 1 Aug 2019 at 20:51, Peter Uhnak <i.uhnak@gmail.com> wrote:
I imagine because it is quite a rare edge-case use and is not easy to implement: - for Linux you check for dot - for Windows you need to either modify the VM (see File class>>lookupDirectory:filename: to provide more information), or directly use WinAPI from Pharo to retrieve the hidden file attribute - for MacOS it is my understanding that you need to do both of the above and then some
Peter
As Peter wrote, this hasn't been requested much, but...
In Pharo 8:
(aFileReference entry statAttributes at: 13) anyMask: 16r2
Will answer a boolean indicating whether it is hidden or not (only on Windows).
"aFileReference entry statAttributes at: 13" is the WIN32_FILE_ATTRIBUTE_DATA: https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constan...
HTH, Alistair