Represents a directory in a hierarchical file system.

no type hierarchy

no subtypes hierarchy

Attributes
nameSource Codeshared formal String name

The name of this directory.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: ExistingResource
Attributes inherited from: Resource
Methods
childDirectoriesSource Codeshared formal {Directory*} childDirectories(String filter = ...)

The subdirectories that directly belong to this directory.

Parameters:
  • filter = "*"

    A filter to apply to the file names, expressed as a glob pattern.

childPathsSource Codeshared formal {Path*} childPaths(String filter = ...)

The paths of all files and subdirectories that directly belong to this directory.

Parameters:
  • filter = "*"

    A filter to apply to the file names, expressed as a glob pattern.

childResourceSource Codeshared formal Resource childResource(Path|String subpath)

Obtain a resource belonging to this directory.

childrenSource Codeshared formal {ExistingResource*} children(String filter = ...)

The files and subdirectories that directly belong to this directory.

Parameters:
  • filter = "*"

    A filter to apply to the file names, expressed as a glob pattern.

filesSource Codeshared formal {File*} files(String filter = ...)

The files that directly belong to this directory.

Parameters:
  • filter = "*"

    A filter to apply to the file names, expressed as a glob pattern.

moveSource Codeshared formal Directory move(Nil target)

Move this directory to the given location.

Inherited Methods
Methods inherited from: Object
Methods inherited from: ExistingResource
Nested Classes
TemporaryDirectorySource Codeshared formal TemporaryDirectory

A new temporary Directory. TemporaryDirectorys may be used within resource expressions:

try (tempDirectory = temporaryDirectory.TemporaryDirectory()) {
    // ...
}

If possible, a TemporaryDirectory will be deleted upon invocation of its Destroyable.destroy() method.

TemporaryFileSource Codeshared formal TemporaryFile

A new temporary File. TemporaryFiles may be used within resource expressions:

try (tempFile = temporaryDirectory.TemporaryFile()) {
    // ...
}

If possible, a TemporaryFile will be deleted upon invocation of its Destroyable.destroy() method.