Satisfied Interfaces: ExistingResource, Resource

Represents a file in a hierarchical file system.

Nested Classes
AppenderSource Code
shared formal Appender

A Writer for appending text to this file

OverwriterSource Code
shared formal Overwriter

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

ReaderSource Code
shared formal Reader

A Reader for reading lines of text from this file.

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 Writer appender(String? encoding = null)

Deprecated: Use Appender instead.

A Writer for appending text to this file

Parameters:
  • encoding = null

    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, Boolean copyAttributes = false)

Copy this file to the given location.

Parameters:
  • copyAttributes = false

    Copy attributes of the original file.

copyOverwritingSource Code
shared formal File copyOverwriting(File|Nil target, Boolean copyAttributes = false)

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

Parameters:
  • copyAttributes = false

    Copy attributes of the original file.

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 Reader reader(String? encoding = null)

Deprecated: Use Reader instead.

A Reader for reading lines of text from this file.

Parameters:
  • encoding = null

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

writerSource Code
shared Writer writer(String? encoding = null)

Deprecated: Use Overwriter instead.

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

Parameters:
  • encoding = null

    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