Class Ek9DirectoryStructure

java.lang.Object
org.ek9lang.core.Ek9DirectoryStructure

public final class Ek9DirectoryStructure extends Object
Responsibility of dealing with aspects of the ek9 directory structure. Typically, lib, keys, artefacts and other places where EK9 expects items to be located.
  • Field Details

  • Constructor Details

    • Ek9DirectoryStructure

      public Ek9DirectoryStructure(FileHandling fileHandling)
  • Method Details

    • getTargetExecutableArtefact

      public File getTargetExecutableArtefact(String ek9FullPathToFileName, String targetArchitecture)
      Access the final built artefact that can be executed.
    • getTargetPropertiesArtefact

      public File getTargetPropertiesArtefact(String ek9FullPathToFileName)
      Get final set of properties for the main artefact.
    • validateEk9Directory

      public void validateEk9Directory(String directoryName, String targetArchitecture)
      Check the structure of an Ek9 build directory.
    • makeEk9DevDirectoryStructure

      public void makeEk9DevDirectoryStructure(String fromEk9BaseDirectory, String targetArchitecture)
      Used to create structure under .ek9 in both a project directory and a $HOME/.ek9 directory.
      Parameters:
      fromEk9BaseDirectory - typically $HOME/.ek9/ or /path/to/project/.ek9/
    • cleanEk9DirectoryStructureFor

      public void cleanEk9DirectoryStructureFor(String ek9FullPathToFileName, String targetArchitecture)
      This expects an ek9 source file in a specific directory.
      Parameters:
      ek9FullPathToFileName - i.e. main.ek9
      targetArchitecture - i.e. "java"
    • getMainGeneratedOutputDirectory

      public File getMainGeneratedOutputDirectory(String fromEk9BaseDirectory, String targetArchitecture)
      Get the generated output directory.
    • getMainFinalOutputDirectory

      public File getMainFinalOutputDirectory(String fromEk9BaseDirectory, String targetArchitecture)
      Get the final output directory - where the artefacts will be.
    • getDevGeneratedOutputDirectory

      public File getDevGeneratedOutputDirectory(String fromEk9BaseDirectory, String targetArchitecture)
      Main generated code output directory when in development.
    • getDevFinalOutputDirectory

      public File getDevFinalOutputDirectory(String fromEk9BaseDirectory, String targetArchitecture)
      Main final output directory when in development.
    • deleteStalePackages

      public void deleteStalePackages(String ek9FileNameDirectory, String moduleName)
      Ensure all stale packaged content is removed.
    • isUsersSigningKeyPairPresent

      public boolean isUsersSigningKeyPairPresent()
      Does a key pair for signing content exist.
    • getUsersSigningKeyPair

      public SigningKeyPair getUsersSigningKeyPair()
      Get the key signing pair for this user.
    • saveToHomeEk9Directory

      public boolean saveToHomeEk9Directory(SigningKeyPair keyPair)
      Save the signing key pair to the users home directory.