Interface IFileApi


  • public interface IFileApi
    The API for file operations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void createOrSetContent​(org.eclipse.core.resources.IFile file, Supplier<InputStream> streamSupplier)
      Creates a new file with the content provided by the supplier or just set the file content if it already exists.
      void delete​(org.eclipse.core.resources.IFile file)
      Deletes the specified file.
      void move​(org.eclipse.core.resources.IFile src, org.eclipse.core.resources.IFile dst)
      Moves the specified src file to the dst.
    • Method Detail

      • createOrSetContent

        void createOrSetContent​(org.eclipse.core.resources.IFile file,
                                Supplier<InputStream> streamSupplier)
        Creates a new file with the content provided by the supplier or just set the file content if it already exists.
        Parameters:
        file - the file to create or set content, cannot be null.
        streamSupplier - the supplier of the input stream, cannot be null.
      • delete

        void delete​(org.eclipse.core.resources.IFile file)
        Deletes the specified file.
        Parameters:
        file - the file to delete, cannot be null.
      • move

        void move​(org.eclipse.core.resources.IFile src,
                  org.eclipse.core.resources.IFile dst)
        Moves the specified src file to the dst.
        Parameters:
        src - the source file to move, cannot be null.
        dst - the destination, cannot be null.