271 "Modified: / 29-08-2006 / 12:40:28 / cg" |
271 "Modified: / 29-08-2006 / 12:40:28 / cg" |
272 ! ! |
272 ! ! |
273 |
273 |
274 !Filename class methodsFor:'instance creation'! |
274 !Filename class methodsFor:'instance creation'! |
275 |
275 |
|
276 applicationDataDirectory |
|
277 "return the directory, where user-and-application-specific private files are to be |
|
278 located (ini-files, preferences etc.). |
|
279 Under windows, something like 'C:\Users\Administrator\AppData\Roaming\<appName>' |
|
280 is returned, under unix, we use ~/.<appName> (but see details in UnixOS). |
|
281 For smalltalk itself (the IDE), 'smalltalk' is used as appName. |
|
282 If the directory does not exist, it is created" |
|
283 |
|
284 |exeName| |
|
285 |
|
286 Smalltalk isStandAloneApp ifTrue:[ |
|
287 exeName := OperatingSystem nameOfSTXExecutable. |
|
288 ] ifFalse:[ |
|
289 exeName := 'smalltalk' |
|
290 ]. |
|
291 ^ self applicationDataDirectoryFor:exeName |
|
292 |
|
293 " |
|
294 Filename applicationDataDirectory |
|
295 " |
|
296 ! |
|
297 |
276 applicationDataDirectoryFor:appName |
298 applicationDataDirectoryFor:appName |
277 "return the directory, where user-and-application-specific private files are to be |
299 "return the directory, where user-and-application-specific private files are to be |
278 located (ini-files, preferences etc.). |
300 located (ini-files, preferences etc.). |
279 Under windows, something like 'C:\Users\Administrator\AppData\Roaming\<appName>' |
301 Under windows, something like 'C:\Users\Administrator\AppData\Roaming\<appName>' |
280 is returned, under unix, we use ~/.<appName> (but see details in UnixOS). |
302 is returned, under unix, we use ~/.<appName> (but see details in UnixOS). |
6094 ! ! |
6118 ! ! |
6095 |
6119 |
6096 !Filename class methodsFor:'documentation'! |
6120 !Filename class methodsFor:'documentation'! |
6097 |
6121 |
6098 version |
6122 version |
6099 ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.432 2014-11-27 16:48:48 stefan Exp $' |
6123 ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.433 2014-12-18 14:49:57 cg Exp $' |
6100 ! |
6124 ! |
6101 |
6125 |
6102 version_CVS |
6126 version_CVS |
6103 ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.432 2014-11-27 16:48:48 stefan Exp $' |
6127 ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.433 2014-12-18 14:49:57 cg Exp $' |
6104 ! ! |
6128 ! ! |
6105 |
6129 |
6106 |
6130 |
6107 Filename initialize! |
6131 Filename initialize! |