Initially : the simple answer was that you cannot do this. Android is based on Java 6, and (AFAIK) there is no java.nio.file Java 7 classes reverse port for Android.
(This is not surprising. Porting java.nio.file will entail significant changes to the Davlik VM native code libraries.)
Updated : according to Android javadocs , support for the java.nio.file package was added to Android at API level 26. This corresponds to the release of Oreo, which was released in August 2017.
Can you tell me what API I should use for my requirements. (My requirement is a file operation, for example: Cut | copy | delete for files and directories);
Prior to Android 26, I suggest you just use the java.io.File class for things like creating directories, renaming files, etc., and then implement βhigher levelβ operations, such as copying files and directory trees using File.list() and FileInpuStream or FileOutputStream . You could simplify some operations by using classes such as Apache Commons DirectoryWalker FileUtils or Guava Files .
However, I am not sure what you are seeking here. Already there are file manager applications for Android.
source share