Category: Streams-Files
Superclass: FilePath
FileWrapper gives information for virtual files that refer to a real file on disk.

Method category index

initializing (class)
instance creation (class)
accessing (instance)
basic (instance)
delegation (instance)
enumerating (instance)
file operations (instance)
testing (instance)

initializing (class)

initialize
Register the receiver with ObjectMemory

update: aspect

Private - Remove the files before quitting, and register the virtual filesystems specified by the subclasses upon image load.

top


instance creation (class)

on: file
Create an instance of this class representing the contents of the given file, under the virtual filesystem fsName.

top


accessing (instance)

asString
Answer the string representation of the receiver's path.

at: aName

Answer a File or Directory object as appropriate for a file named 'aName' in the directory represented by the receiver.

lastAccessTime: accessDateTime lastModifyTime: modifyDateTime

Update the timestamps of the file corresponding to the receiver, to be accessDateTime and modifyDateTime.

name

Answer the full path to the receiver.

owner: ownerString group: groupString

Set the receiver's owner and group to be ownerString and groupString.

pathTo: destName

Compute the relative path from the receiver to destName.

top


basic (instance)

= aFile
Answer whether the receiver represents the same file as the receiver.

hash

Answer a hash value for the receiver.

top


delegation (instance)

creationTime
Answer the creation time of the file identified by the receiver. On some operating systems, this could actually be the last change time (the `last change time' has to do with permissions, ownership and the like).

full

Answer the size of the file identified by the receiver

isExecutable

Answer whether a file with the name contained in the receiver does exist and is executable

isReadable

Answer whether a file with the name contained in the receiver does exist and is readable

isWriteable

Answer whether a file with the name contained in the receiver does exist and is writeable

lastAccessTime

Answer the last access time of the file identified by the receiver

lastChangeTime

Answer the last change time of the file identified by the receiver (the `last change time' has to do with permissions, ownership and the like). On some operating systems, this could actually be the file creation time.

lastModifyTime

Answer the last modify time of the file identified by the receiver (the `last modify time' has to do with the actual file contents).

mode

Answer the permission bits for the file identified by the receiver

mode: anInteger

Answer the permission bits for the file identified by the receiver

open: class mode: mode ifFail: aBlock

Open the receiver in the given mode (as answered by FileStream's class constant methods)

remove

Remove the file with the given path name

size

Answer the size of the file identified by the receiver

top


enumerating (instance)

namesDo: aBlock
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name.

top


file operations (instance)

pathFrom: dirName
Compute the relative path from the directory dirName to the receiver

renameTo: newName

Rename the file identified by the receiver to newName

symlinkAs: destName

Create destName as a symbolic link of the receiver. The appropriate relative path is computed automatically.

symlinkFrom: srcName

Create the receiver as a symbolic link from srcName (relative to the path of the receiver).

top


testing (instance)

exists
Answer whether a file with the name contained in the receiver does exist.

isAbsolute

Answer whether the receiver identifies an absolute path.

isAccessible

Answer whether a directory with the name contained in the receiver does exist and can be accessed

isDirectory

Answer whether a file with the name contained in the receiver does exist identifies a directory.

isSymbolicLink

Answer whether a file with the name contained in the receiver does exist and identifies a symbolic link.

top