All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty.tools.dotc.interfaces.AbstractFile Maven / Gradle / Ivy

There is a newer version: 3.6.0-RC1-bin-20240918-be10596-NIGHTLY
Show newest version
package dotty.tools.dotc.interfaces;

import java.io.File;
import java.util.Optional;

/** An abstract file may either be a file on disk or a virtual file.
 *
 *  Do not rely on the identity of instances of this class.
 *
 *  User code should not implement this interface, but it may have to
 *  manipulate objects of this type.
 */
public interface AbstractFile {
  /** @return The name of this file, note that two files may have the same name. */
  String name();

  /** @return The path of this file, this might be a virtual path of an unspecified format. */
  String path();

  /** @return If this is a real file on disk, a `java.io.File` that corresponds to this file.
   *  Otherwise, an empty `Optional`.
   */
  Optional jfile();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy