What is a File class?

August 12th, 2008 by uCertify Leave a reply »

A File class is used to access the file and directory objects. This class provides numerous access methods for performing all common file and directory operations. These methods enable files and directories to be created, deleted, renamed, and listed. However, the File class does not provide any method to change the current directory. The File class is useful only for querying and modifying the attributes of a file. It does not have any method for reading from and writing to a file. The File class has the following four constructors:

  • File(File parent, String child)
    This constructor will create a new File instance from a parent abstract pathname and a child pathname.
  • File(String Path)
    This constructor will create a new File instance by converting the given pathname into an abstract pathname.
  • File(String parent, String child)
    This constructor will create a new File instance from a parent pathname and a child pathname.
  • File(URI uriobj)
    This constructor will create a new File instance by using the uriobj, which is a URI object that describes a file.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.