java.io.File [1]

私はファイルおよびディレクトリを操作します。

フィールド

  • public static final char separatorChar - システムのデフォルトの名前区切り文字
  • public static final String separator - システムのデフォルトの名前区切り文字
  • public static final char pathSeparatorChar - システムのパス区切り文字
  • public static final String pathSeparator - システムのパス区切り文字

メソッド

  • delete - ファイルまたはディレクトリを削除
  • getCanonicalFile - フルパスを知らせます

File f = new File("moge.dat");
System.out.println(f.getCanonicalFile());