Class FlowFileUtils

java.lang.Object
com.vaadin.flow.utils.FlowFileUtils

public final class FlowFileUtils extends Object
Util methods for files manipulation.
Since:
1.0.
Author:
Vaadin Ltd
  • Method Details

    • forceMkdir

      public static void forceMkdir(File directory)
      A FileUtils.forceMkdir(File) wrapper that handles IOException.
      Parameters:
      directory - the directory to create, must not be null
      Throws:
      UncheckedIOException - if FileUtils.forceMkdir(File) throws IOException
    • convertToUrl

      public static URL convertToUrl(File file)
      Converts File to URL wrapping checked exception.
      Parameters:
      file - file to convert
      Returns:
      corresponding URL
      Throws:
      IllegalArgumentException - when fails to convert