PCFilename.st
changeset 13104 39e5ff75d48a
parent 12775 71dfc35f62d2
child 13158 75976f0d731a
equal deleted inserted replaced
13103:2cbf8acd98c3 13104:39e5ff75d48a
   402      See also: #pathName, #directoryPathName and #baseName.
   402      See also: #pathName, #directoryPathName and #baseName.
   403      Compatibility note: use #head for ST-80 compatibility."
   403      Compatibility note: use #head for ST-80 compatibility."
   404 
   404 
   405     |nm|
   405     |nm|
   406 
   406 
       
   407     (nameString endsWith:':\') ifTrue:[
       
   408         ^ nameString
       
   409     ].
       
   410 
   407     nm := super directoryName.
   411     nm := super directoryName.
   408     (nm size == 2 and:[(nm at:2) == $:]) ifTrue:[
   412     (nm size == 2 and:[(nm at:2) == $:]) ifTrue:[
   409         ^ nm , '\'
   413         ^ nm , '\'
   410     ].
   414     ].
   411     ^ nm
   415     ^ nm
   412 
   416 
   413     "
   417     "
   414      (PCFilename named:'c:\users') directoryName
   418      (PCFilename named:'c:\') directoryName    
       
   419      (PCFilename named:'c:\users') directoryName   
   415      (PCFilename named:'c:\users') directory pathName   
   420      (PCFilename named:'c:\users') directory pathName   
   416      (PCFilename named:'c:\users') directory isRootDirectory  
   421      (PCFilename named:'c:\users') directory isRootDirectory  
   417     "
   422     "
       
   423 
       
   424     "Modified: / 26-10-2010 / 12:45:55 / cg"
   418 !
   425 !
   419 
   426 
   420 fileType
   427 fileType
   421     "this returns a string describing the type of contents of
   428     "this returns a string describing the type of contents of
   422      the file. Here, the suffix is examined for a standard
   429      the file. Here, the suffix is examined for a standard
   877 ! !
   884 ! !
   878 
   885 
   879 !PCFilename class methodsFor:'documentation'!
   886 !PCFilename class methodsFor:'documentation'!
   880 
   887 
   881 version
   888 version
   882     ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.50 2010-03-09 12:09:53 cg Exp $'
   889     ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.51 2010-10-26 10:47:38 cg Exp $'
   883 !
   890 !
   884 
   891 
   885 version_CVS
   892 version_CVS
   886     ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.50 2010-03-09 12:09:53 cg Exp $'
   893     ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.51 2010-10-26 10:47:38 cg Exp $'
   887 ! !
   894 ! !