--- a/Filename.st Wed Feb 26 11:43:47 2003 +0100
+++ b/Filename.st Wed Feb 26 12:14:41 2003 +0100
@@ -3632,8 +3632,9 @@
- thats the file/directory name without leading parent-dirs.
(i.e. '/usr/lib/st/file' asFilename baseName -> 'file'
and '/usr/lib' asFilename baseName -> lib).
- This method does not check if the path is valid
-
+ This method does not check if the path is valid.
+ The code here should work for Unix and MSDOS, but needs to be redefined
+ for VMS (and maybe others as well).
See also: #pathName, #directoryName and #directoryPathName.
Compatibility note: use #tail for ST-80 compatibility."
@@ -3642,16 +3643,16 @@
sep := self separator.
len := nameString size.
((len == 1) and:[(nameString at:1) == sep]) ifTrue:[
- ^ nameString
+ ^ nameString
].
endIdx := len.
len > 1 ifTrue:[
- (nameString at:len) == sep ifTrue:[endIdx := endIdx - 1].
+ (nameString at:len) == sep ifTrue:[endIdx := endIdx - 1].
].
index := nameString lastIndexOf:sep startingAt:len-1.
index == 0 ifTrue:[
- ^ nameString copyTo:endIdx
+ ^ nameString copyTo:endIdx
].
^ nameString copyFrom:(index+1) to:endIdx
@@ -4688,7 +4689,7 @@
!Filename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.244 2003-02-26 10:43:47 mb Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.245 2003-02-26 11:14:41 cg Exp $'
! !
Filename initialize!