java.lang.Object
com.yuzhyn.azylee.core.ios.files.FileTool

public class FileTool extends Object
  • 构造器详细资料

    • FileTool

      public FileTool()
  • 方法详细资料

    • isExist

      public static boolean isExist(String pathName)
    • create

      public static boolean create(String pathName)
    • recreate

      public static boolean recreate(String pathName)
    • delete

      public static boolean delete(String pathName)
    • copy

      public static boolean copy(String source, String target)
      复制文件(默认覆盖目标已有文件)
      参数:
      source - 参数
      target - 参数
      返回:
      返回 返回
    • copy

      public static boolean copy(String source, String target, boolean overwrite)
      复制文件(覆盖选项自选)
      参数:
      source - 参数
      target - 参数
      overwrite - 参数
      返回:
      返回 返回
    • move

      public static boolean move(String source, String target)
    • rename

      public static boolean rename(String source, String target)
    • inputStreamToFile

      public static boolean inputStreamToFile(InputStream inputStream, String targetFilePath, boolean overwrite)
    • getExt

      public static String getExt(String s)
      获取文件扩展名
      参数:
      s - 参数
      返回:
      返回 返回
    • getNameWithoutExt

      public static String getNameWithoutExt(String s)
    • getName

      public static String getName(String s)
      获取文件名
      参数:
      s - 参数
      返回:
      返回 返回
    • getPath

      public static String getPath(String s)
      获取文件路径
      参数:
      s - 参数
      返回:
      返回 返回
    • getSize

      public static long getSize(String file)
    • main

      public static void main(String[] args)