eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Comanche::SimulatedSqueakFileDirectory':



Class: SimulatedSqueakFileDirectory (in Comanche)



rev: 1.20 date: 2018/04/26 10:48:42
user: cg
file: SimulatedSqueakFileDirectory.st directory: goodies/webServer/comanche
module: stx stc-classLibrary: comanche

Class protocol:

create/delete file
o  default

o  deleteFilePath: fullPathToAFile
Delete the file after finding its directory

o  localNameFor: fullName
Return the local part the given name.

o  on: pathString
Return a new file directory for the given path, of the appropriate FileDirectory subclass for the current OS platform.

name utilities
o  dirPathFor: fullName
Return the directory part the given name.

o  splitName: fullName to: pathAndNameBlock
Take the file name and convert it to the path name of a directory and a local file name within that directory. FileName must be of the form: <dirPath><delimiter><localName>, where <dirPath><delimiter> is optional. The <dirPath> part may contain delimiters.

o  maxFileNameLength

o  pathNameDelimiter
return the active directory class's directory seperator character

o  slash

Instance protocol:

o  checkName: aFileName fixErrors: fixing
Check a string aFileName for validity as a file name. Answer the original file name if it is valid. If the name is not valid (e.g., it is too long or contains illegal characters) and fixing is false, raise an error. If fixing is true, fix the name (usually by truncating and/or tranforming characters), and answer the corrected name. The default behavior is just to truncate the name to the maximum length for this platform. Subclasses can do any kind of checking and correction appropriate for their platform.

o  deleteFileNamed: localFileName
Delete the file with the given name in this directory.

o  deleteFileNamed: localFileName ifAbsent: aBlock
Delete the file with the given name in this directory.

o  fileName: something
set the value of the instance variable 'fileName' (automatically generated)

o  fullNameFor: fileName
Return a corrected, fully-qualified name for the given file name. If the given name is already a full path (i.e., it contains a delimiter character), assume it is already a fully-qualified name. Otherwise, prefix it with the path to this directory. In either case, correct the local part of the file name.

o  fullPathFor: path

o  newFileNamed: localFileName

o  oldFileNamed: localFileName

o  pathNameDelimiter
Return the delimiter character for this kind of directory. This depends on the current platform.

create/delete file
o  deleteDirectory: dName

o  containingDirectory

o  copyFile: fileStream1 toFile: fileStream2

o  createDirectory: dirName

o  directoryExists: subFileName

o  directoryNamed: subDirName

o  directoryNames

o  entries

o  entryAt: aBaseName
Squeak DirectoryEntry

o  fileExists: subFileName

o  fileNamed: localFileName

o  fileNames

o  pathParts

o  readOnlyFileNamed: subFileName

o  printOn: aStream

o  slash

ST/X; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 10 Aug 2022 10:59:15 GMT