Package 

Class AbstractUsbFile

  • All Implemented Interfaces:
    com.github.mjdev.libaums.fs.UsbFile , java.io.Closeable , java.lang.AutoCloseable

    
    public abstract class AbstractUsbFile
     implements UsbFile
                        

    Created by magnusja on 3/1/17.

    • Constructor Detail

      • AbstractUsbFile

        AbstractUsbFile()
    • Method Detail

      • getName

         abstract String getName()

        Set a new name for this file or directory.

      • setName

         abstract Unit setName(String name)

        Set a new name for this file or directory.

        Parameters:
        name - The new name.
      • getParent

         abstract UsbFile getParent()

        Returns the parent directory for the file or directory or null if this is the root directory.

      • getLength

         abstract Long getLength()

        Sets the new file length. This can sometimes be more efficient if all needed place for a file is allocated on the disk at once and before writing to it.

        If the space is not allocated before writing the space must be exceeded every time a new write occurs. This can sometimes be less efficient.

      • setLength

         abstract Unit setLength(Long length)

        Sets the new file length. This can sometimes be more efficient if all needed place for a file is allocated on the disk at once and before writing to it.

        If the space is not allocated before writing the space must be exceeded every time a new write occurs. This can sometimes be less efficient.

        Parameters:
        length - The file length in bytes.
      • search

         UsbFile search(String path)

        Tries to search a corresponding entry associated with the path parameter. Path separator is '/'. Parameter path must not start with an '/' (except if querying from root directory). Path is treated relative to current UsbFile.

        Parameters:
        path - The path to the resource to search.