Satisfied Interfaces: ExistingResource, Resource

Represents a file in a hierarchical file system.

Attributes
contentTypeSource Code
shared formal String? contentType

Determine the content type of this file, if possible.

directorySource Code
shared formal Directory directory

The directory containing this file.

executableSource Code
shared formal Boolean executable

Determine if this file may be executed.

hiddenSource Code
shared formal Boolean hidden

Determine if this file is considered hidden.

lastModifiedMillisecondsSource Code
shared formal variable Integer lastModifiedMilliseconds

The timestamp of the last modification of this file.

nameSource Code
shared formal String name

The name of this file.

readableSource Code
shared formal Boolean readable

Determine if this file may be read from.

sizeSource Code
shared formal Integer size

The size of this file, in bytes.

storeSource Code
shared formal Store store

The store to which this file belongs.

writableSource Code
shared formal Boolean writable

Determine if this file may be written to.

Inherited Attributes
Attributes inherited from: Object
hash, string
Attributes inherited from: ExistingResource
Attributes inherited from: Resource
Methods
appenderSource Code
shared formal Writer appender(String? encoding)

A Writer for appending text to this file

Parameters:
  • encoding

    The character encoding to use, where null indicates that the platform default character encoding should be used.

copySource Code
shared formal File copy(Nil target)

Copy this file to the given location.

copyOverwritingSource Code
shared formal File copyOverwriting(File|Nil target)

Copy this file to the given location, overwriting the target if it already exists.

Source Code
shared formal File createLink(Nil target)

Create a hard link to this file.

Source Code
shared formal Link createSymbolicLink(Nil target)

Create a symbolic link to this file.

moveSource Code
shared formal File move(Nil target)

Move this file to the given location.

moveOverwritingSource Code
shared formal File moveOverwriting(File|Nil target)

Move this file to the given location, overwriting the target if it already exists.

readerSource Code
shared formal Reader reader(String? encoding)

A Reader for reading lines of text from this file.

Parameters:
  • encoding

    The character encoding to use, where null indicates that the platform default character encoding should be used.

writerSource Code
shared formal Writer writer(String? encoding)

A Writer for writing text to this file, after truncating the file to length 0.

Parameters:
  • encoding

    The character encoding to use, where null indicates that the platform default character encoding should be used.

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: ExistingResource