Package ghidra.util.filechooser
Interface GhidraFileChooserModel
- 
- All Known Implementing Classes:
- LocalFileChooserModel
 
 public interface GhidraFileChooserModelInterface for the GhidraFileChooser data model. This allows the GhidraFileChooser to operate on files from different sources, other than just the local file system.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancreateDirectory(java.io.File directory, java.lang.String name)Creates a directory in the specified directory with the specified name.java.lang.StringgetDescription(java.io.File file)Returns a description for the specified file.java.io.FilegetDesktopDirectory()Returns the user's desktop directory, as defined by their operating system and/or their windowing environment, or null if there is no desktop directory.java.io.FilegetHomeDirectory()Returns the home directory.javax.swing.IcongetIcon(java.io.File file)Returns an icon for the specified file.java.io.File[]getListing(java.io.File directory, java.io.FileFilter filter)Returns an array of the files that exist in the specified directory.java.io.File[]getRoots()Returns the root drives/directories.chargetSeparator()Returns the file separator char.booleanisAbsolute(java.io.File file)Tests whether this abstract pathname is absolute.booleanisDirectory(java.io.File file)Tests whether the file denoted by this abstract pathname is a directory.booleanrenameFile(java.io.File src, java.io.File dest)Renames the src file to the dest file.voidsetListener(GhidraFileChooserListener l)Set the model listener.
 
- 
- 
- 
Method Detail- 
setListenervoid setListener(GhidraFileChooserListener l) Set the model listener.- Parameters:
- l- the new model listener
 
 - 
getHomeDirectoryjava.io.File getHomeDirectory() Returns the home directory.- Returns:
- the home directory
 
 - 
getDesktopDirectoryjava.io.File getDesktopDirectory() Returns the user's desktop directory, as defined by their operating system and/or their windowing environment, or null if there is no desktop directory.Example: "/home/the_user/Desktop" or "c:/Users/the_user/Desktop" - Returns:
- desktop directory
 
 - 
getRootsjava.io.File[] getRoots() Returns the root drives/directories. On windows, "C:\", "D:\", etc. On linux, "/".- Returns:
- the root drives
 
 - 
getListingjava.io.File[] getListing(java.io.File directory, java.io.FileFilter filter)Returns an array of the files that exist in the specified directory.- Parameters:
- directory- the directory
- Returns:
- an array of files
 
 - 
getIconjavax.swing.Icon getIcon(java.io.File file) Returns an icon for the specified file.- Parameters:
- file- the file
- Returns:
- an icon for the specified file
 
 - 
getDescriptionjava.lang.String getDescription(java.io.File file) Returns a description for the specified file.- Parameters:
- file- the file
- Returns:
- a description for the specified file
 
 - 
createDirectoryboolean createDirectory(java.io.File directory, java.lang.String name)Creates a directory in the specified directory with the specified name.- Parameters:
- directory- the directory in which to create the new directory
- name- the name of the directory
- Returns:
- true if the new directory was create.
 
 - 
isDirectoryboolean isDirectory(java.io.File file) Tests whether the file denoted by this abstract pathname is a directory.- Returns:
- trueif and only if the file denoted by this abstract pathname exists and is a directory;- falseotherwise
 
 - 
isAbsoluteboolean isAbsolute(java.io.File file) Tests whether this abstract pathname is absolute. The definition of absolute pathname is system dependent. On UNIX systems, a pathname is absolute if its prefix is"/". On Microsoft Windows systems, a pathname is absolute if its prefix is a drive specifier followed by"\\", or if its prefix is"\\".- Returns:
- trueif this abstract pathname is absolute,- falseotherwise
 
 - 
renameFileboolean renameFile(java.io.File src, java.io.File dest)Renames the src file to the dest file.- Parameters:
- src- the file to be renamed
- dest- the new file
- Returns:
- true if the file was renamed
 
 - 
getSeparatorchar getSeparator() Returns the file separator char. On windows, '\' On linux, '/'.- Returns:
- the file separator char
 
 
- 
 
-