Class GhidraFile

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<java.io.File>

    public class GhidraFile
    extends java.io.File
    An extension of File that does not translate to the native operating system's file separator. For example, on Windows:
    File f = new File("c:/temp/foo.txt");
    String path = f.getAbsolutePath();
    In this case, path equals "c:\temp\foo.txt". However using GhidraFile, path would still equal "c:/temp/foo.txt"
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.io.File

        pathSeparator, pathSeparatorChar, separator, separatorChar
    • Constructor Summary

      Constructors 
      Constructor Description
      GhidraFile​(java.io.File parent, java.lang.String name, char separator)
      Construct a new GhidraFile.
      GhidraFile​(java.lang.String path, char separator)
      Construct a new GhidraFile.
      GhidraFile​(java.lang.String parent, java.lang.String child, char separator)
      Construct a new GhidraFile.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getAbsoluteFile()  
      java.lang.String getAbsolutePath()  
      java.io.File getCanonicalFile()  
      java.lang.String getCanonicalPath()  
      java.lang.String getParent()  
      java.io.File getParentFile()  
      java.lang.String getPath()  
      • Methods inherited from class java.io.File

        canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getFreeSpace, getName, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GhidraFile

        public GhidraFile​(java.lang.String parent,
                          java.lang.String child,
                          char separator)
        Construct a new GhidraFile.
        Parameters:
        parent - the parent directory; eg, "c:\temp"
        child - the child file name; eg, "foo.txt"
        separator - the separator character; eg, '/' or '\'
      • GhidraFile

        public GhidraFile​(java.lang.String path,
                          char separator)
        Construct a new GhidraFile.
        Parameters:
        path - the path to the file; eg, "c:\temp\foo.txt" or "temp\foo.txt"
        separator - the separator character; eg, '/' or '\'
      • GhidraFile

        public GhidraFile​(java.io.File parent,
                          java.lang.String name,
                          char separator)
        Construct a new GhidraFile.
        Parameters:
        parent - the parent file path
        name - the name of the file
        separator - the separator character; eg, '/' or '\'
    • Method Detail

      • getAbsoluteFile

        public java.io.File getAbsoluteFile()
        Overrides:
        getAbsoluteFile in class java.io.File
        See Also:
        File.getAbsoluteFile()
      • getCanonicalFile

        public java.io.File getCanonicalFile()
                                      throws java.io.IOException
        Overrides:
        getCanonicalFile in class java.io.File
        Throws:
        java.io.IOException
        See Also:
        File.getCanonicalFile()
      • getAbsolutePath

        public java.lang.String getAbsolutePath()
        Overrides:
        getAbsolutePath in class java.io.File
        See Also:
        File.getAbsolutePath()
      • getCanonicalPath

        public java.lang.String getCanonicalPath()
                                          throws java.io.IOException
        Overrides:
        getCanonicalPath in class java.io.File
        Throws:
        java.io.IOException
        See Also:
        File.getCanonicalPath()
      • getParent

        public java.lang.String getParent()
        Overrides:
        getParent in class java.io.File
        See Also:
        File.getParent()
      • getParentFile

        public java.io.File getParentFile()
        Overrides:
        getParentFile in class java.io.File
        See Also:
        File.getParentFile()
      • getPath

        public java.lang.String getPath()
        Overrides:
        getPath in class java.io.File
        See Also:
        File.getPath()