Category: Streams-Files
Superclass: FilePath
I enable access to the properties of files that are on disk.

Method category index

C call-outs (class)
C functions (class)
file operations (class)
initialization (class)
instance creation (class)
reading system defaults (class)
testing (class)
accessing (instance)
basic (instance)
directory operations (instance)
file name management (instance)
file operations (instance)
still unclassified (instance)
testing (instance)

C call-outs (class)

sync
Answer the receiver.

top


C functions (class)

errno
Answer the current value of C errno.

stringError: errno

Answer C strerror's result for errno.

top


file operations (class)

checkError
Return whether an error had been reported or not. If there had been one, raise an exception too

checkError: errno

The error with the C code `errno' has been reported. If errno >= 1, raise an exception

link: srcName as: destName

Create a hard link for the srcName file with the given path name

link: destName from: srcName

Create a hard link named destName file from the given path

remove: fileName

Remove the file with the given path name

rename: oldFileName to: newFileName

Rename the file with the given path name oldFileName to newFileName

symlink: srcName as: destName

Create a symlink for the srcName file with the given path name

symlink: destName from: srcName

Create a symlink named destName file from the given path (relative to destName)

touch: fileName

Update the timestamp of the file with the given path name.

top


initialization (class)

initialize
Initialize the receiver's class variables

top


instance creation (class)

name: aName
Answer a new file with the given path. The path is turned into an absolute path.

path: aString

Answer a new file with the given path. The path is not validated until some of the fields of the newly created objects are accessed

top


reading system defaults (class)

executable
Answer the full path to the executable being run.

image

Answer the full path to the image being used.

top


testing (class)

exists: fileName
Answer whether a file with the given name exists

isAccessible: fileName

Answer whether a directory with the given name exists and can be accessed

isExecutable: fileName

Answer whether a file with the given name exists and can be executed

isReadable: fileName

Answer whether a file with the given name exists and is readable

isWriteable: fileName

Answer whether a file with the given name exists and is writeable

top


accessing (instance)

asString
Answer the name of the file identified by the receiver

at: aString

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

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

isDirectory

Answer whether the file is a directory.

isSocket

Answer whether the file is an AF_UNIX socket.

isSymbolicLink

Answer whether the file is a symbolic link.

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

Set the permission bits for the file identified by the receiver to be anInteger.

name

Answer the name of the file identified by the receiver

pathTo: destName

Compute the relative path from the receiver to destName.

refresh

Refresh the statistics for the receiver

size

Answer the size of the file identified by the receiver

top


basic (instance)

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

hash

Answer a hash value for the receiver.

top


directory operations (instance)

createDirectory
Create the receiver as a directory.

namesDo: aBlock

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

top


file name management (instance)

full
Answer the full name of the receiver, resolving the `.' and `..' directory entries, and answer the result. Answer nil if the name is invalid (such as '/usr/../../badname')

top


file operations (instance)

lastAccessTime: accessDateTime lastModifyTime: modifyDateTime
Set the receiver's timestamps to be accessDateTime and modifyDateTime.

linkAs: destName

Create destName as a symbolic link of the receiver.

linkFrom: srcName

Create the receiver as hard link from path destName

open: class mode: mode ifFail: aBlock

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

owner: ownerString group: groupString

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

pathFrom: dir

Compute the relative path from the directory dirName to the receiver

remove

Remove the file with the given path name

renameTo: newFileName

Rename the file with the given path name to newFileName

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 symlink from path destName

top


still unclassified (instance)

, aName
Answer an object of the same kind as the receiver, whose name is suffixed with aName.

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 is accessible

isExecutable

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

isFileSystemPath

Answer whether the receiver corresponds to a real filesystem path.

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

top