--- a/PCFilename.st Thu Jul 24 13:08:57 2014 +0200
+++ b/PCFilename.st Thu Jul 24 15:19:05 2014 +0200
@@ -509,10 +509,11 @@
self isRootDirectory ifFalse:[^ false].
pathName := self asString asLowercase.
+ ^ (OperatingSystem getDriveType:pathName) == 5
- ((pathName = 'a:\') or:[pathName = 'b:\']) ifTrue:[^ false].
-
- ^ (OperatingSystem getDriveType:pathName) == 2
+ "
+ 'd:' asFilename isCDRom
+ "
!
isDirectory
@@ -526,16 +527,25 @@
!
isDrive
- "return true, if is is a drive"
+ "return true, if is is a drive,
+ that is either a fixed, removable, ramdisk or cdrom"
+
|pathName|
self isRootDirectory ifFalse:[^ false].
pathName := self asString asLowercase.
- ((pathName = 'a:\') or:[pathName = 'b:\']) ifTrue:[^ false].
+ "/ ((pathName = 'a:\') or:[pathName = 'b:\']) ifTrue:[^ false].
+ ^ #(2 3 5 6) includes:(OperatingSystem getDriveType:pathName)
- ^ (OperatingSystem getDriveType:pathName) == 1
+ "
+ 'z:' asFilename isDrive
+ 'c:' asFilename isDrive
+ 'd:' asFilename isDrive
+ 'a:\' asFilename isDrive
+ 'b:\' asFilename isDrive
+ "
!
isExecutableProgram
@@ -907,13 +917,14 @@
!PCFilename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.62 2014-06-10 10:20:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.63 2014-07-24 13:19:05 ab Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.62 2014-06-10 10:20:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.63 2014-07-24 13:19:05 ab Exp $'
!
version_SVN
- ^ '$Id: PCFilename.st,v 1.62 2014-06-10 10:20:23 cg Exp $'
+ ^ '$Id: PCFilename.st,v 1.63 2014-07-24 13:19:05 ab Exp $'
! !
+