Top "Java.nio.file" questions

This standard Java package defines classes and interfaces to access files, file attributes and file systems.

Setting/changing the ctime or "Change time" attribute on a file

I wish to change the timestamp metadata on files in Java using the java.nio.Files class. I would like …

java linux ext4 filemtime java.nio.file
How to avoid java.nio.file.AccessDeniedException when using java.nio.file.Files.move()?

My Java program (see below) sometimes crashes with a java.nio.file.AccessDeniedException in a java.nio.File.move() method …

java exception java.nio.file
java.nio.file: Where is the Path interface actually implemented?

Recently I was doing some coding using the java.nio.file package introduced in Java 7 and saw an example using …

java java-7 java.nio.file
How to guarantee atomic move or exception of a file in Java?

In one of my projects I have concurrent write access to one single file within one JRE and want to …

java multithreading atomic java.nio.file
Handle temporary file in try with resources

For my application, I have to write a method that takes an InputStream as argument, writes the content to a …

java try-with-resources java.nio.file
NoSuchFileException when using java.nio.file.Files.createTempDirectory

I have an issue when trying to create a temporary directory with java.nio.file.Files.createTempDirectory. I keep getting …

java io temporary-files java.nio.file nosuchfileexception
Using Java 8 NIO, how can I read a file while skipping the first line or header record?

I am trying to read a large file line by line, in java, using NIO library. But this file also …

java java-8 java.nio.file
creating a virtual file system with JIMFS

I'd like to use Google's JIMFS for creating a virtual file system for testing purposes. I have trouble getting started, …

java java.nio.file jimfs jsr203
how can i fix the Java 7 Files.write error?

my code writes to a file, I am getting access denied error while writing to the file. Files.write(path, …

java file-io java-7 java.nio.file