get appData directory
authorsr
Thu, 29 Jul 2010 12:14:05 +0200
changeset 12971 8aa39c96e885
parent 12970 89cd540547d1
child 12972 1fb37a018fb2
get appData directory
AbstractOperatingSystem.st
--- a/AbstractOperatingSystem.st	Thu Jul 29 12:14:02 2010 +0200
+++ b/AbstractOperatingSystem.st	Thu Jul 29 12:14:05 2010 +0200
@@ -5524,6 +5524,24 @@
 
 !AbstractOperatingSystem class methodsFor:'users & groups'!
 
+getApplicationDataDirectoryFor:appName
+    "return the directory, where user-and-application-specific private files are to be
+     located (ini-files, preferences etc.).
+     Under windows, something like 'C:\Users\Administrator\AppData\Roaming\<appName>'
+     is returned, here, the fallback ~/.<appName> is returned.
+     Notice that only the name is returned; the directory is not guaranteed to exist."
+
+    "{ Pragma: +optSpace }"
+
+    ^ self getHomeDirectory asFilename constructString:('.',appName)
+
+    "
+     OperatingSystem getApplicationDataDirectoryFor:'expecco'  
+    "
+
+    "Created: / 29-07-2010 / 12:07:25 / sr"
+!
+
 getDesktopDirectory
     "{ Pragma: +optSpace }"
 
@@ -6935,11 +6953,11 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.198 2010-07-23 09:48:39 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.199 2010-07-29 10:14:05 sr Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.198 2010-07-23 09:48:39 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.199 2010-07-29 10:14:05 sr Exp $'
 ! !
 
 AbstractOperatingSystem initialize!