FileSystem enhancement

Project:JNode FS
Component:Code
Category:feature request
Priority:normal
Assigned:Peter
Status:active
Description

There should be made some changes to the FileSystem API before there are too much working filesystems in JNode. It's easier to add it now, than later Smiling

Since we try to keep to the Java API, and since there will be enhancements in Java Mustang regarding FileSystem/File API, I propose to use their syntax.

Changes for Files (aka FSEntry) should get these new methods:

public boolean setReadable(boolean)
public boolean setWritable(bookean)
public boolean setExecutable(boolean)

Further the FileSystem API should get these new methods:

public long getTotalSpace();
public long getFreeSpace();
public long getUsableSpace();

These methods can then be called from a FSEntry, since FSEntry knows its FileSystem.

The API changes made by SUN are noted here.

#1

That seems too limited for Jnode though, which is supposed to offer the flexibility of an operating system. When you call setReadable(boolean), who does it become readable to? The current user? The current group? Everyone else? Someone on an NT domain?

#2

I have done the link with the new FileSystem APIs from openjdk and JNode FileSystems.
For now, the implementations in of these APIs in JNode FileSystems are stubs : someone have to do that.

#1

Project:JNode Core» JNode Shell

Moving to appropriate project. And the issue raised by Daniel should be addressed once we have some kind of user management.

#2

Project:JNode Shell» JNode FS