Interface File

All Superinterfaces:
TypedValue
All Known Implementing Classes:
Files.AbstractFile, Files.DataFile, Files.Directory, Files.UnknownChildFile, Files.UnknownFile

public interface File extends TypedValue
Directory in the file system.

Its type is progressive, so that it can discover new files and subdirectories.

See Also:
  • Method Details

    • expand

      default File expand()
      Expands this file to a file with a more precise type.

      During expansion, record types may get new fields, never lose them.

      This file object may or may not be mutable. If this file is immutable and is expanded, returns the new file. If this file is mutable, returns this file regardless of whether expansion occurred; the caller cannot discern whether expansion occurred.

    • discoverField

      default File discoverField(TypeSystem typeSystem, String fieldName)
      Description copied from interface: TypedValue
      Tries to expand the type to include the given field name.

      Returns this value or an expanded value.

      Specified by:
      discoverField in interface TypedValue