パッケージ org.nkjmlab.util.java.io
クラス FileUtils
java.lang.Object
org.nkjmlab.util.java.io.FileUtils
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明static void
forEachFileInDir
(File dir, Consumer<File> consumer) static void
forEachFileInDirInParallel
(File dir, Consumer<File> consumer) getAllFiles
(File dir) static File
static String
static File
getFileInCurrentDirectory
(String relativePath) static File
getFileInUserDirectory
(File parent, String fileName) Getting a file object in the user directory which is referrenced bySystem.getProperty("user.home")
.static File
getFileInUserDirectory
(String fileName) Getting a file object in the user directory which is referrenced bySystem.getProperty("user.home")
.static FileReader
getFileReader
(File file) Getting a file reader offile
static FileReader
getFileReader
(String fileName) Getting a file reader offileName
static FileWriter
getFileWriter
(File file) Getting a file writer offile
static FileWriter
getFileWriter
(File file, boolean append) Getting a file writer offile
with the option ofappend
.static FileWriter
getFileWriter
(String fileName) Getting a file writer offileName
static File
Getting a temp file object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.static Path
Getting a path object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.static String
Getting a string object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.static File
getTempFile
(File parent, String fileName) Getting a temp file object in the directory in temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.static File
getTempFile
(String fileName) Getting a temp file object in the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.static File
Getting a file object of the temporal directory which is referrenced bySystem.getProperty("user.home")
.static Path
Getting a path object of the directory which is referenced bySystem.getProperty("user.home")
.static String
Getting a string object of the directory which is referenced bySystem.getProperty("user.home")
.static BufferedReader
newBufferedReader
(Path path) static BufferedReader
newBufferedReader
(Path path, Charset cs) static BufferedWriter
newBufferedWriter
(Path path, Charset cs, OpenOption... options) static BufferedWriter
newBufferedWriter
(Path path, OpenOption... options) static byte[]
readAllBytes
(Path path) readAllLines
(Path path) readAllLines
(Path path, Charset cs) static Path
write
(Path path, byte[] bytes, OpenOption... options) static Path
write
(Path path, Iterable<? extends CharSequence> lines, Charset cs, OpenOption... options) static Path
write
(Path path, Iterable<? extends CharSequence> lines, OpenOption... options) static Path
write
(Path path, String line, Charset cs, OpenOption... options) static Path
write
(Path path, String line, OpenOption... options)
-
コンストラクタの詳細
-
FileUtils
public FileUtils()
-
-
メソッドの詳細
-
getTempDirectory
Getting a temp file object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.- 戻り値:
-
getTempDirectoryPath
Getting a path object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.- 戻り値:
-
getTempDirectoryPathString
Getting a string object of the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.- 戻り値:
-
getUserDirectory
Getting a file object of the temporal directory which is referrenced bySystem.getProperty("user.home")
.- 戻り値:
-
getUserDirectoryPath
Getting a path object of the directory which is referenced bySystem.getProperty("user.home")
.- 戻り値:
-
getUserHomeDirectoryPathString
Getting a string object of the directory which is referenced bySystem.getProperty("user.home")
.- 戻り値:
-
getCurrentDirectoryPathString
-
getCurrentDirectory
-
getFileInCurrentDirectory
-
getTempFile
Getting a temp file object in the directory in temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.- パラメータ:
parent
-fileName
-- 戻り値:
-
getTempFile
Getting a temp file object in the temporal directory which is referrenced bySystem.getProperty("java.io.tmpdir")
.- パラメータ:
fileName
-- 戻り値:
-
getFileInUserDirectory
Getting a file object in the user directory which is referrenced bySystem.getProperty("user.home")
.- パラメータ:
fileName
-- 戻り値:
-
getFileInUserDirectory
Getting a file object in the user directory which is referrenced bySystem.getProperty("user.home")
.- パラメータ:
parent
-fileName
-- 戻り値:
-
getFileReader
Getting a file reader offileName
- パラメータ:
fileName
-- 戻り値:
-
getFileReader
Getting a file reader offile
- パラメータ:
fileName
-- 戻り値:
-
getFileWriter
Getting a file writer offileName
- パラメータ:
fileName
-- 戻り値:
-
getFileWriter
Getting a file writer offile
- パラメータ:
fileName
-- 戻り値:
-
getFileWriter
Getting a file writer offile
with the option ofappend
.- パラメータ:
file
-append
-- 戻り値:
-
newBufferedReader
-
newBufferedReader
-
newBufferedWriter
-
newBufferedWriter
-
write
public static Path write(Path path, Iterable<? extends CharSequence> lines, Charset cs, OpenOption... options) -
write
-
write
-
write
-
readAllBytes
-
write
-
readAllLines
-
lines
-
lines
-
readAllLines
-
getAllFiles
-
forEachFileInDirInParallel
-
forEachFileInDir
-