A DESCRIPTION OF THE REQUEST :
In windows, Java Gives result of Access Control List. But in Linux or in Ubuntu Machine it doesn't same work.
Ext4 partition also not support access control list.
NTFS partition supports Access Control List but in windows not with Linux platform.
There should be platform independent API that supports most of file system and filesystem related features.
SimpleFileVisitor also should be platfrom independent.In linux/ubuntu it throws exceptions.
JUSTIFICATION :
To create platform independent programs.
All file system support and Linux also through exception when visiting File System.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should work in most platfroms in linux/ubuntu and windows.
SimpleFileVisitor throws exception in ubuntu/linux.
Access Control LIst also not work with ubuntu/Linux.
ACTUAL -
SimpleFileVisitor throws exception.
Files.getFileAttributeView(startingDir.toPath(), AclFileAttributeView.class);
Throws exception.
---------- BEGIN SOURCE ----------
--------------------------1-----------------------------------------------
AclFileAttributeView view =Files.getFileAttributeView(startingDir.toPath(), AclFileAttributeView.class);
-------------------------------2-------------------------------------------
private class Finder extends SimpleFileVisitor<Path> {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
return CONTINUE;
}
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
return CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) {
return CONTINUE;
}
}
---------- END SOURCE ----------
In windows, Java Gives result of Access Control List. But in Linux or in Ubuntu Machine it doesn't same work.
Ext4 partition also not support access control list.
NTFS partition supports Access Control List but in windows not with Linux platform.
There should be platform independent API that supports most of file system and filesystem related features.
SimpleFileVisitor also should be platfrom independent.In linux/ubuntu it throws exceptions.
JUSTIFICATION :
To create platform independent programs.
All file system support and Linux also through exception when visiting File System.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should work in most platfroms in linux/ubuntu and windows.
SimpleFileVisitor throws exception in ubuntu/linux.
Access Control LIst also not work with ubuntu/Linux.
ACTUAL -
SimpleFileVisitor throws exception.
Files.getFileAttributeView(startingDir.toPath(), AclFileAttributeView.class);
Throws exception.
---------- BEGIN SOURCE ----------
--------------------------1-----------------------------------------------
AclFileAttributeView view =Files.getFileAttributeView(startingDir.toPath(), AclFileAttributeView.class);
-------------------------------2-------------------------------------------
private class Finder extends SimpleFileVisitor<Path> {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
return CONTINUE;
}
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
return CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) {
return CONTINUE;
}
}
---------- END SOURCE ----------