I am probably overlooking something but what's the right way to create a file Path
from a folder Path
? This is what I'm doing but it seems wrong to convert the folder path to a string just to reconstruct it. Is there a better way?
Path testFolder = Files.createTempDirectory("fileFinder");
Path testFile = Paths.get(testFolder.toString(), "sample.java");
Files.createFile(testFile);
Aucun commentaire:
Enregistrer un commentaire