Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

Remove Ads
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards




share
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

OCPJP708.3

Cert Obj Read and change file and directory attributes

[8.3.1]objective Read and change file and directory attributes, focusing on the BasicFileAttributes, DosFileAttributes, and PosixFileAttributes interfaces.
[8.3.2] Prior to nio.2 we were using File file.canWrite(), file.canRead() eg File file = new File("test"); file.lastModified();
[8.3.3] After Java 7 we can use Files Path path = Paths.get("test"); Files.getLastModifiedTime(path);
[8.3.4]BasicFileAttributes "attributes common to many file systems." What they mean is that you can rely on these attributes being available to you unless you are writing Java code for some funky new operating system. Basic attributes include things like creation date.
[8.3.5]PosixFileAttributes POSIX stands for Portable Operating System Interface. This interface is implemented by both UNIX- and Linux-based operating systems.
[8.3.6]DosFileAttributes DOS stands for Disk Operating System. It is part of all Windows operating systems. Even Windows 8 has a DOS prompt available.
[8.3.7]The BasicFileAttributes and BasicFileAttributeView interfaces are a bit confusing. They have similar names but different functionality, and you get them in different ways. Try to remember these three things: ■ Only BasicFileAttributeView is singular. ■ You get BasicFileAttributeView using Files.getFileAttributeView, BasicFileAttributes using Files.readAttributes.■ You can ONLY update attributes in BasicFileAttributeView, not in BasicFileAttributes.
[8.3.8]There is an alternative way to set these attributes where you don't have to worry about the String values. However, the exam wants you to know how to use Files. It is good to know both ways, though. DosFileAttributeView view = Files.getFileAttributeView(path, DosFileAttributeView.class); view.setHidden(true); view.setReadOnly(true);
[8.3.9]
Created by: MVK2013