Class MakeCleanDirectoryStep

  • public final class MakeCleanDirectoryStep
    extends Object
    Deletes the directory, if it exists, before creating it. MakeCleanDirectoryStep is preferable to MkdirStep if the directory may contain many generated files and we want to avoid the case where it could accidentally include generated files from a previous run in Buck.

    For example, for a directory of .class files, if the user deletes a .java file that generated one of the .class files, the .class file corresponding to the deleted .java file should no longer be there when javac is run again.