Class FileSystemUtil

java.lang.Object
net.n2oapp.framework.config.util.FileSystemUtil

public class FileSystemUtil extends Object
Since:
15.04.2015
Author:
operehod
  • Field Details

    • FILE_NAME_WITHOUT_DOTS

      public static final Predicate<String> FILE_NAME_WITHOUT_DOTS
  • Constructor Details

    • FileSystemUtil

      public FileSystemUtil()
  • Method Details

    • saveContentToFile

      public static void saveContentToFile(InputStream content, File file)
    • saveContentToFile

      public static void saveContentToFile(String content, File file)
    • removeContentByUri

      public static Boolean removeContentByUri(String uri)
    • getNodesByLocationPattern

      public static List<Node> getNodesByLocationPattern(String locationPattern)
    • getNodesByLocationPattern

      public static List<Node> getNodesByLocationPattern(List<String> locationPattern)
    • getNodeByClasspathUri

      public static Node getNodeByClasspathUri(String uri)
    • getNodesByLocationPattern

      public static List<Node> getNodesByLocationPattern(String locationPattern, Predicate<String> nameFilter)
    • getContent

      public static String getContent(Node node)
    • getContentByUri

      public static String getContentByUri(String uri)
    • getContentByUri

      public static String getContentByUri(String uri, boolean isExistRequired)
    • getContentAsStream

      public static InputStream getContentAsStream(String path) throws IOException
      Throws:
      IOException
    • getContentAsStream

      public static InputStream getContentAsStream(String path, boolean isExistRequired) throws IOException
      Throws:
      IOException
    • getContentFromResource

      public static String getContentFromResource(org.springframework.core.io.Resource resource)
    • removeAllFromDirectory

      public static void removeAllFromDirectory(String dir, List<String> excludePaths)
    • getFileSizeByUri

      public static long getFileSizeByUri(String uri) throws IOException
      Throws:
      IOException