|
Class: UnixFilename
Object
|
+--Filename
|
+--UnixFilename
- Package:
- stx:libbasic
- Category:
- OS-Unix
- Version:
- rev:
1.28
date: 2017/09/21 09:13:48
- user: stefan
- file: UnixFilename.st directory: libbasic
- module: stx stc-classLibrary: libbasic
Filenames in Unix.
defaults
-
defaultTempDirectoryName
-
return the default temp directory as a filename.
usage example(s):
Filename defaultTempDirectoryName
Filename defaultTempDirectoryName exists
Filename defaultTempDirectoryName isWritable
|
queries
-
isBadCharacter: aCharacter
-
return true, if aCharacter is unallowed in a filename.
-
isCaseSensitive
-
return true, if filenames are case sensitive.
This is not really correct, as the sensitivity may depend on
the paricular mounted file system (NFS, for example)
-
nullFilename
-
Return /dev/null
usage example(s):
-
parentDirectoryName
-
return the name used for the parent directory.
This is '..' for unix and dos-like systems.
(there may be more in the future.
-
separator
-
return the file/directory separator.
usage example(s):
Filename concreteClass separator
|
-
separatorString
-
return the file/directory separator as a string.
usage example(s):
file queries
-
fileType
-
this returns a string describing the type of contents of the file.
This is done using the unix 'file' command,
(which usually is configurable by /etc/magic).
Warning:
Since the returned string differs among systems (and language settings),
it is only useful for user-information;
NOT as a tag to be used by a program.
For this, use mimeType or mimeTypeOfContents.
usage example(s):
ones are checked first, using the general fileType implementation.
|
usage example(s):
'Makefile' asFilename fileType
'.' asFilename fileType
'/dev/null' asFilename fileType
'smalltalk.rc' asFilename fileType
'bitmaps/SBrowser.xbm' asFilename fileType
'../../libtool/bitmaps/SBrowser.xbm' asFilename fileType
'./stx' asFilename fileType
|
queries
-
isExplicitRelative
-
return true, if this name is an explicit relative name
(i.e. starts with './' or '../', to avoid path-prepending)
-
isHidden
-
return true, if the receiver represents a hidden file.
On UNIX, a name starting with a period is considered hidden.
-
isImplicit
-
return true, if the receiver represents builtin names such as '.' or '..'.
On UNIX, the current and parent dir names are considered implicit.
special accessing
-
osName
-
redefined from superclass, because we do not distinguish file and directory names
(self named:'/tmp/äöü') writeStream close
|