Package | Description |
---|---|
org.openide.filesystems |
NetBeans internally uses the concept of a
virtual filesystem.
|
org.openide.filesystems.spi |
Modifier and Type | Method and Description |
---|---|
FileObject |
FileObject.copy(FileObject target,
String name,
String ext)
Copies this file.
|
static FileObject |
FileUtil.copyFile(FileObject source,
FileObject destFolder,
String newName)
Copies file to the selected folder.
|
static FileObject |
FileUtil.copyFile(FileObject source,
FileObject destFolder,
String newName,
String newExt)
Copies file to the selected folder.
|
static FileObject |
FileUtil.createData(File data)
Returns FileObject for a data file.
|
static FileObject |
FileUtil.createData(FileObject folder,
String name)
Returns a data file on given filesystem if such a data file exists.
|
FileObject |
FileObject.createData(String name)
Create new data file in this folder with the specified name.
|
abstract FileObject |
FileObject.createData(String name,
String ext)
Create new data file in this folder with the specified name.
|
static FileObject |
FileUtil.createFolder(File folder)
Returns FileObject for a folder.
|
static FileObject |
FileUtil.createFolder(FileObject folder,
String name)
Returns a folder on given filesystem if such a folder exists.
|
abstract FileObject |
FileObject.createFolder(String name)
Create a new folder below this one with the specified name.
|
FileObject |
FileSystem.createTempFile(FileObject parent,
String prefix,
String suffix,
boolean deleteOnExit)
Creates temporary file in the given parent folder.
|
FileObject |
Repository.find(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead.
|
FileObject |
MultiFileSystem.find(String aPackage,
String name,
String ext)
Deprecated.
|
FileObject |
FileSystem.find(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead, or use
FileSystem.findResource(java.lang.String) if you are not interested in classpaths. |
static FileObject |
FileUtil.findBrother(FileObject fo,
String ext)
Finds brother file with same base name but different extension.
|
static FileObject |
URLMapper.findFileObject(URL url)
Find an appropriate instance of FileObject that addresses this URL
|
static FileObject[] |
URLMapper.findFileObjects(URL url)
Deprecated.
Use
URLMapper.findFileObject(java.net.URL) instead. |
FileObject |
AbstractFileSystem.findResource(String name) |
FileObject |
Repository.findResource(String name)
Deprecated.
Please use the ClassPath API instead.
|
FileObject |
MultiFileSystem.findResource(String name) |
abstract FileObject |
FileSystem.findResource(String name)
Finds a file given its full resource path.
|
protected FileObject |
MultiFileSystem.findResourceOn(FileSystem fs,
String res)
Finds a resource on given filesystem.
|
static FileObject[] |
FileUtil.fromFile(File file)
Deprecated.
Use
FileUtil.toFileObject(java.io.File) instead. |
static FileObject |
FileUtil.getArchiveFile(FileObject fo)
Returns a FileObject representing an archive file containing the
FileObject given by the parameter.
|
static FileObject |
FileUtil.getArchiveRoot(FileObject fo)
Returns a FileObject representing the root folder of an archive.
|
FileObject |
FileObject.getCanonicalFileObject()
Return a FileObject with path where all symbolic links are resolved.
|
abstract FileObject[] |
FileObject.getChildren()
Get all children of this folder (files and subfolders).
|
static FileObject |
FileUtil.getConfigFile(String path)
Returns
FileObject from the NetBeans default (system, configuration)
filesystem or null if does not exist. |
static FileObject |
FileUtil.getConfigRoot()
Returns the root of the NetBeans default (system, configuration)
filesystem.
|
FileObject |
FileEvent.getFile() |
FileObject |
FileObject.getFileObject(String relativePath)
Retrieve file or folder relative to a current folder, with a given relative path.
|
FileObject |
FileObject.getFileObject(String relativePath,
boolean onlyExisting)
Retrieve file or folder relative to a current folder, with a given relative path.
|
abstract FileObject |
FileObject.getFileObject(String name,
String ext)
Retrieve file or folder contained in this folder by name.
|
abstract FileObject[] |
URLMapper.getFileObjects(URL url)
Get an array of FileObjects for this URL.
|
abstract FileObject |
FileObject.getParent()
Get parent folder.
|
FileObject |
AbstractFileSystem.getRoot() |
FileObject |
MultiFileSystem.getRoot()
Root of the filesystem.
|
abstract FileObject |
FileSystem.getRoot()
Getter for root folder in the filesystem.
|
static FileObject |
FileUtil.getSystemConfigFile(String path)
Returns
FileObject from the default filesystem, or null if the file does not exist. |
static FileObject |
FileUtil.getSystemConfigRoot()
Returns the root of the NetBeans default (system, configuration)
filesystem.
|
FileObject |
FileSystem.getTempFolder()
Returns temporary folder if it is avaliable on this file system.
|
FileObject |
FileObject.move(FileLock lock,
FileObject target,
String name,
String ext)
Moves this file.
|
static FileObject |
FileUtil.moveFile(FileObject source,
FileObject destFolder,
String newName)
Moves file to the selected folder.
|
FileObject |
FileObject.readSymbolicLink()
Read symbolic link.
|
protected FileObject |
AbstractFileSystem.refreshRoot()
Instruct the filesystem
that the root should change.
|
static FileObject |
FileUtil.toFileObject(File file)
Converts a disk file to a matching file object.
|
static FileObject |
FileUtil.toFileObject(Path path)
Converts a Path to a FileObject if that is possible.
|
Modifier and Type | Method and Description |
---|---|
FileObject |
FileObject.copy(FileObject target,
String name,
String ext)
Copies this file.
|
static void |
FileUtil.copyAttributes(FileObject source,
FileObject dest)
Copies attributes from one file to another.
|
static void |
FileUtil.copyAttributes(FileObject source,
FileObject dest,
java.util.function.BiFunction<String,Object,Object> attrTransformer)
Copies attributes from one file to another.
|
static FileObject |
FileUtil.copyFile(FileObject source,
FileObject destFolder,
String newName)
Copies file to the selected folder.
|
static FileObject |
FileUtil.copyFile(FileObject source,
FileObject destFolder,
String newName,
String newExt)
Copies file to the selected folder.
|
static FileObject |
FileUtil.createData(FileObject folder,
String name)
Returns a data file on given filesystem if such a data file exists.
|
static FileObject |
FileUtil.createFolder(FileObject folder,
String name)
Returns a folder on given filesystem if such a folder exists.
|
FileObject |
FileSystem.createTempFile(FileObject parent,
String prefix,
String suffix,
boolean deleteOnExit)
Creates temporary file in the given parent folder.
|
protected Enumeration<? extends FileObject> |
AbstractFileSystem.existingFileObjects(FileObject fo)
For the FileObject specified as parameter, returns the recursive enumeration
of existing children fileobjects (both folders and data).
|
static void |
FileUtil.extractJar(FileObject fo,
InputStream is)
Deprecated.
Use of XML filesystem layers generally obsoletes this method.
For tests, use
org.openide.util.test.TestFileUtils#unpackZipFile . |
static FileObject |
FileUtil.findBrother(FileObject fo,
String ext)
Finds brother file with same base name but different extension.
|
static String |
FileUtil.findFreeFileName(FileObject folder,
String name,
String ext)
Finds an unused file name similar to that requested in the same folder.
|
static String |
FileUtil.findFreeFolderName(FileObject folder,
String name)
Finds an unused folder name similar to that requested in the same parent folder.
|
abstract String |
MIMEResolver.findMIMEType(FileObject fo)
Resolves FileObject and returns recognized MIME type
|
protected FileSystem |
MultiFileSystem.findSystem(FileObject fo)
For given file object finds the filesystem that the object is placed on.
|
static URL |
URLMapper.findURL(FileObject fo,
int type)
Find a good URL for this file object which works according to type:
inside this VM
inside this machine
from networked machines
|
static FileObject |
FileUtil.getArchiveFile(FileObject fo)
Returns a FileObject representing an archive file containing the
FileObject given by the parameter.
|
static FileObject |
FileUtil.getArchiveRoot(FileObject fo)
Returns a FileObject representing the root folder of an archive.
|
static String |
FileUtil.getFileDisplayName(FileObject fo)
Get an appropriate display name for a file object.
|
protected Map<String,Set<String>> |
MIMEResolver.UIHelpers.getMIMEToExtensions(FileObject fo)
Returns mapping of MIME type to set of extensions.
|
static String |
FileUtil.getMIMEType(FileObject fo)
Resolves MIME type.
|
static String |
FileUtil.getMIMEType(FileObject fo,
String... withinMIMETypes)
Resolves MIME type.
|
static String |
FileUtil.getRelativePath(FileObject folder,
FileObject fo)
Gets a relative resource path between folder and fo.
|
abstract URL |
URLMapper.getURL(FileObject fo,
int type)
Get a good URL for this file object which works according to type:
inside this VM
inside this machine
from networked machines
The implementation can't use neither
FileUtil.toFile(org.openide.filesystems.FileObject) nor FileUtil.toFileObject(java.io.File)
otherwise StackOverflowError maybe thrown. |
boolean |
FileStatusEvent.hasChanged(FileObject file)
Check whether the given file has been changed.
|
protected static Enumeration<String> |
MultiFileSystem.hiddenFiles(FileObject folder,
boolean rec)
Finds all hidden files on given filesystem.
|
static boolean |
FileUtil.isArchiveArtifact(FileObject fo)
Tests if an file is inside an archive.
|
static boolean |
FileUtil.isArchiveFile(FileObject fo)
Tests if a file represents a java archive.
|
static boolean |
FileUtil.isParentOf(FileObject folder,
FileObject fo)
Recursively checks whether the file is underneath the folder.
|
static boolean |
FileUtil.isRecursiveSymbolicLink(FileObject fo)
Check whether some FileObject is a recursive symbolic link.
|
protected boolean |
MIMEResolver.UIHelpers.isUserDefined(FileObject mimeResolverFO)
Checks whether a given resolver is user-defined.
|
protected void |
MultiFileSystem.markUnimportant(FileObject fo)
Notification that a file has been marked unimportant.
|
FileObject |
FileObject.move(FileLock lock,
FileObject target,
String name,
String ext)
Moves this file.
|
static FileObject |
FileUtil.moveFile(FileObject source,
FileObject destFolder,
String newName)
Moves file to the selected folder.
|
protected void |
MultiFileSystem.notifyMigration(FileObject fo)
Notification that a file has migrated from one filesystem
to another.
|
static File |
FileUtil.toFile(FileObject fo)
Finds appropriate java.io.File to FileObject if possible.
|
static Path |
FileUtil.toPath(FileObject fo)
Finds appropriate java.nio.file.Path to FileObject if possible.
|
Constructor and Description |
---|
FileAttributeEvent(FileObject src,
FileObject file,
String name,
Object oldValue,
Object newValue)
Creates new
FileAttributeEvent . |
FileAttributeEvent(FileObject src,
FileObject file,
String name,
Object oldValue,
Object newValue,
boolean expected)
Creates new
FileAttributeEvent . |
FileAttributeEvent(FileObject src,
String name,
Object oldValue,
Object newValue)
Creates new
FileAttributeEvent . |
FileEvent(FileObject src)
Creates new
FileEvent . |
FileEvent(FileObject src,
FileObject file)
Creates new
FileEvent , specifying the action object. |
FileEvent(FileObject src,
FileObject file,
boolean expected)
Creates new
FileEvent , specifying the action object. |
FileEvent(FileObject src,
FileObject file,
boolean expected,
long time)
Creates new
FileEvent , specifying all its details. |
FileRenameEvent(FileObject src,
FileObject file,
String name,
String ext)
Creates new
FileRenameEvent , specifying an event location. |
FileRenameEvent(FileObject src,
FileObject file,
String name,
String ext,
boolean expected)
Creates new
FileRenameEvent , specifying an event location
and whether the event was expected by the system. |
FileRenameEvent(FileObject src,
String name,
String ext)
Creates new
FileRenameEvent . |
FileStatusEvent(FileSystem fs,
FileObject file,
boolean icon,
boolean name)
Creates new FileStatusEvent
|
Modifier and Type | Method and Description |
---|---|
default FileObject |
ArchiveRootProvider.getArchiveFile(FileObject fo)
Returns a FileObject representing an archive file containing the
FileObject given by the parameter.
|
default FileObject |
ArchiveRootProvider.getArchiveRoot(FileObject fo)
Returns a FileObject representing the root folder of an archive.
|
Modifier and Type | Method and Description |
---|---|
default FileObject |
ArchiveRootProvider.getArchiveFile(FileObject fo)
Returns a FileObject representing an archive file containing the
FileObject given by the parameter.
|
default FileObject |
ArchiveRootProvider.getArchiveRoot(FileObject fo)
Returns a FileObject representing the root folder of an archive.
|
default boolean |
ArchiveRootProvider.isArchiveArtifact(FileObject fo)
Tests if an file is inside an archive.
|
default boolean |
ArchiveRootProvider.isArchiveFile(FileObject fo,
boolean strict)
Tests if a file represents an java archive.
|