*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 15 Sep 1997 23:02:50 +0200
changeset 2931 11bcbf8738c6
parent 2930 a8999d16b8f9
child 2932 427725621da0
*** empty log message ***
UnixFilename.st
--- a/UnixFilename.st	Mon Sep 15 23:00:48 1997 +0200
+++ b/UnixFilename.st	Mon Sep 15 23:02:50 1997 +0200
@@ -9,6 +9,20 @@
 
 !UnixFilename class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 1997 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
 documentation
 "
     Filenames in Unix.
@@ -93,8 +107,30 @@
     "Modified: 7.9.1997 / 23:43:03 / cg"
 ! !
 
+!UnixFilename methodsFor:'queries'!
+
+isExplicitRelative
+    "return true, if this name is an explicit relative name
+     (i.e. starts with './' or '../', to avoid path-prepending)"
+
+    (nameString startsWith:'./') ifTrue:[
+	^ true
+    ].
+    (nameString startsWith:'../') ifTrue:[
+	^ true
+    ].
+    ^ false
+!
+
+isHidden
+    "return true, if the receiver represents a hidden file.
+     On UNIX, a name starting with a period is considered hidden."
+
+    ^ self baseName startsWith:'.'
+! !
+
 !UnixFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.3 1997-09-09 17:35:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UnixFilename.st,v 1.4 1997-09-15 21:02:50 cg Exp $'
 ! !