Back: VFS.TmpFileArchiveMemberHandler-finalization Up: Base classes Forward: VFS.VFSHandler class-initializing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.206 VFS.VFSHandler

Defined in namespace Smalltalk.VFS
Superclass: Object
Category: Streams-Files
VFSHandler is the abstract class for implementations of File and Directory. These classes only delegate to the appropriate handler, which is in charge of actually accessing or "molding" the filesystem.

1.206.1 VFS.VFSHandler class: initializing  (class)
1.206.2 VFS.VFSHandler class: instance creation  (class)
1.206.3 VFS.VFSHandler: accessing  (instance)
1.206.4 VFS.VFSHandler: directory operations  (instance)
1.206.5 VFS.VFSHandler: file operations  (instance)
1.206.6 VFS.VFSHandler: releasing  (instance)
1.206.7 VFS.VFSHandler: testing  (instance)


1.206.1 VFS.VFSHandler class: initializing

fileSystems
Answer the virtual file systems that can be processed by this subclass. The default is to answer an empty array, but subclasses can override this. If you do so, you should override #vfsFor:name:subPath: as well or you risk infinite loops.

initialize
Register the receiver with ObjectMemory

priority
Answer the priority for this class (higher number = higher priority) in case multiple classes implement the same file system. The default is 0.

register: fileSystem forClass: vfsHandlerClass
Register the given file system to be handled by an instance of vfsHandlerClass. This is automatically called if the class overrides #fileSystems.

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


1.206.2 VFS.VFSHandler class: instance creation

for: fileName
Answer the (real or virtual) file handler for the file named fileName


1.206.3 VFS.VFSHandler: accessing

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).

fullName
Answer the name of the file identified by the receiver as answered by File>>#name.

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).

name
Answer the name of the file identified by the receiver

realFileName
Answer the real file name which holds the file contents, or nil if it does not apply.

refresh
Refresh the statistics for the receiver

size
Answer the size of the file identified by the receiver


1.206.4 VFS.VFSHandler: directory operations

at: aName
Answer a VFSHandler for a file named `aName' residing in the directory represented by the receiver.

createDir: dirName
Create a subdirectory of the receiver, naming it dirName.

do: aBlock
Evaluate aBlock once for each file in the directory represented by the receiver, passing its name. aBlock should not return.


1.206.5 VFS.VFSHandler: file operations

lastAccessTime: accessDateTime lastModifyTime: modifyDateTime
Set the receiver's timestamps to be accessDateTime and modifyDateTime. If your file system does not support distinct access and modification times, you should discard accessDateTime.

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

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

openDescriptor: 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

renameTo: newFileName
Rename the file with the given path name oldFileName to newFileName

symlinkFrom: srcName
Create the receiver as a symlink from the relative path srcName


1.206.6 VFS.VFSHandler: releasing

finalize
Upon finalization, we remove the file that was temporarily holding the file contents


1.206.7 VFS.VFSHandler: testing

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

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 and identifies a directory.

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

isSymbolicLink
Answer whether the file is a symbolic link.

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



Back: VFS.VFSHandler-releasing Up: VFS.VFSHandler Forward: Warning   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html