Class MFileOS7

  • All Implemented Interfaces:
    Comparable<MFile>, MFile

    @ThreadSafe
    public class MFileOS7
    extends Object
    implements MFile
    Use Java 7 nio Paths
    Since:
    11/16/13
    • Method Detail

      • getExistingFile

        public static MFileOS7 getExistingFile​(String filename)
                                        throws IOException
        Make MFileOS7 if file exists, otherwise return null
        Parameters:
        filename - full path name
        Returns:
        MFileOS or null
        Throws:
        IOException
      • getLastModified

        public long getLastModified()
        Description copied from interface: MFile
        Get time of last modification at the time the MFile object was created
        Specified by:
        getLastModified in interface MFile
        Returns:
        time of last modification in Unix time (msecs since reference), or -1 if unknown
      • getLength

        public long getLength()
        Description copied from interface: MFile
        Size of file in bytes
        Specified by:
        getLength in interface MFile
        Returns:
        Size of file in bytes or -1 if unknown
      • isDirectory

        public boolean isDirectory()
        Specified by:
        isDirectory in interface MFile
      • isReadable

        public boolean isReadable()
        Specified by:
        isReadable in interface MFile
      • getPath

        public String getPath()
        Description copied from interface: MFile
        Get full path name, replace \\ with /
        Specified by:
        getPath in interface MFile
        Returns:
        full path name
      • getName

        public String getName()
        Description copied from interface: MFile
        The name is the farthest element from the root in the directory hierarchy.
        Specified by:
        getName in interface MFile
        Returns:
        the file name
      • getNioPath

        public Path getNioPath()