Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


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.
Your email address is only used to allow you to reset your password. See 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.

Cert Obj Read and change file and directory attributes

Quiz yourself by thinking what should be in each of the black spaces below before clicking on it to display the answer.
        Help!  

[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]    
🗑


   

Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
 
To hide a column, click on the column name.
 
To hide the entire table, click on the "Hide All" button.
 
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
 
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.

 
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
Created by: MVK2013
Popular Computers sets