ringojs icon indicating copy to clipboard operation
ringojs copied to clipboard

Make Java NIO standard options available in fs.open()

Open botic opened this issue 8 years ago • 3 comments

The Java NIO API provides useful standard open options[1] for file operations. At the moment Ringo only supports READ, WRITE, APPEND. Ringo could also provide shortcuts / options for CREATE, CREATE_NEW, DELETE_ON_CLOSE, SPARSE, TRUNCATE_EXISTING.

[1] http://docs.oracle.com/javase/7/docs/api/java/nio/file/StandardOpenOption.html

botic avatar Oct 21 '15 15:10 botic

Would be nice, but if it isn't supported in common js, we should provide it in some other way. On the other side: if it doesn't brake the standard, why not... Am 21.10.2015 5:14 nachm. schrieb "Philipp Naderer" < [email protected]>:

The Java NIO API provides useful standard open options[1] for file operations. At the moment Ringo only supports READ, WRITE, APPEND. Ringo could also provide shortcuts / options for CREATE, CREATE_NEW, DELETE_ON_CLOSE, SPARSE, TRUNCATE_EXISTING.

[1] http://docs.oracle.com/javase/7/docs/api/java/nio/file/StandardOpenOption.html

— Reply to this email directly or view it on GitHub https://github.com/ringo/ringojs/issues/306.

kmfdm1 avatar Oct 21 '15 18:10 kmfdm1

:+1: these would be just additional options, so i don't see any harm offering them.

grob avatar Oct 21 '15 18:10 grob

Then it will be a useful addition. We should give a hint in the documentation that these aren't standard, tough. Am 21.10.2015 8:15 nachm. schrieb "Robert Gaggl" [email protected]:

[image: :+1:] these would be just additional options, so i don't see any harm offering them.

— Reply to this email directly or view it on GitHub https://github.com/ringo/ringojs/issues/306#issuecomment-149982694.

kmfdm1 avatar Oct 21 '15 18:10 kmfdm1