349 "Created: 30.1.1998 / 12:09:18 / dq" |
349 "Created: 30.1.1998 / 12:09:18 / dq" |
350 ! ! |
350 ! ! |
351 |
351 |
352 !PCFilename methodsFor:'attribute setter'! |
352 !PCFilename methodsFor:'attribute setter'! |
353 |
353 |
|
354 clearHidden |
|
355 "set the hidden attribute to false (unhidden). |
|
356 Return true on success." |
|
357 |
|
358 ^ OperatingSystem clearHidden:(self osNameForFile) |
|
359 |
|
360 "Created: / 12-02-2019 / 12:30:31 / Stefan Vogel" |
|
361 ! |
|
362 |
354 setHidden |
363 setHidden |
355 "return true, if the hidden attribute could be setted to true" |
364 "return true, if the hidden attribute could be set to true" |
356 |
365 |
357 ^ OperatingSystem setHidden:(self osNameForFile) |
366 ^ OperatingSystem setHidden:(self osNameForFile) |
358 ! |
367 |
359 |
368 "Modified (comment): / 12-02-2019 / 12:37:39 / Stefan Vogel" |
360 setNormal |
|
361 " |
|
362 sets all file attributes to the normal state |
|
363 |
|
364 e.g. set the hidden attribute to false (unhidden) |
|
365 " |
|
366 |
|
367 ^ OperatingSystem setNormal:(self osNameForFile) |
|
368 ! ! |
369 ! ! |
369 |
370 |
370 !PCFilename methodsFor:'converting'! |
371 !PCFilename methodsFor:'converting'! |
371 |
372 |
372 makeDOSName |
373 makeDOSName |
696 isHidden |
697 isHidden |
697 "return true, if such a file is hidden. |
698 "return true, if such a file is hidden. |
698 On MSDOS, a name starting with a period is considered hidden |
699 On MSDOS, a name starting with a period is considered hidden |
699 AND a file with a hidden attribute is so." |
700 AND a file with a hidden attribute is so." |
700 |
701 |
701 |baseName| |
702 "/ |baseName| |
702 |
703 "/ |
703 baseName := self baseName. |
704 "/ baseName := self baseName. |
704 "sr: no this is totally wrong, |
705 "sr: no this is totally wrong, |
705 in windows files starting with . are not hidden by definition" |
706 in windows files starting with . are not hidden by definition" |
706 "/ ((baseName startsWith:'.') and:[baseName ~= '..']) ifTrue:[^ true]. |
707 "/ ((baseName startsWith:'.') and:[baseName ~= '..']) ifTrue:[^ true]. |
707 |
708 |
708 ^ OperatingSystem isHidden:(self osNameForFile) |
709 ^ OperatingSystem isHidden:(self osNameForFile) |
709 |
710 |
710 "Modified: / 16-01-2019 / 11:43:46 / sr" |
711 "Modified: / 16-01-2019 / 11:43:46 / sr" |
|
712 "Modified: / 12-02-2019 / 12:15:38 / Stefan Vogel" |
711 ! |
713 ! |
712 |
714 |
713 isRootDirectory |
715 isRootDirectory |
714 "return true, if I represent a root directory |
716 "return true, if I represent a root directory |
715 (i.e. I have no parentDir). |
717 (i.e. I have no parentDir). |