Package | Description |
---|---|
org.openide.filesystems |
NetBeans internally uses the concept of a
virtual filesystem.
|
org.openide.filesystems.spi |
Modifier and Type | Method and Description |
---|---|
protected <T extends FileObject> |
AbstractFileSystem.createReference(T fo)
Creates Reference.
|
protected <T extends FileObject> |
XMLFileSystem.createReference(T fo) |
protected <T extends FileObject> |
JarFileSystem.createReference(T fo) |
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 |
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. |
FileObject |
MultiFileSystem.find(String aPackage,
String name,
String ext)
Deprecated.
|
FileObject |
Repository.find(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead.
|
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) |
abstract FileObject |
FileSystem.findResource(String name)
Finds a file given its full resource path.
|
FileObject |
MultiFileSystem.findResource(String name) |
FileObject |
Repository.findResource(String name)
Deprecated.
Please use the ClassPath API instead.
|
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.
|
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() |
abstract FileObject |
FileSystem.getRoot()
Getter for root folder in the filesystem.
|
FileObject |
MultiFileSystem.getRoot()
Root of 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.
|
Modifier and Type | Method and Description |
---|---|
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).
|
Enumeration<? extends FileObject> |
Repository.findAll(String aPackage,
String name,
String ext)
Deprecated.
Please use the ClassPath API instead.
|
Enumeration<? extends FileObject> |
Repository.findAllResources(String name)
Deprecated.
Please use the ClassPath API instead.
|
protected Reference<? extends FileObject> |
AbstractFileSystem.findReference(String resourceName)
This method allows to find Reference to resourceName
|
Enumeration<? extends FileObject> |
FileObject.getChildren(boolean rec)
Enumerate all children of this folder.
|
Enumeration<? extends FileObject> |
FileObject.getData(boolean rec)
Enumerate all data files in this folder.
|
Enumeration<? extends FileObject> |
FileObject.getFolders(boolean rec)
Enumerate the subfolders of this folder.
|
static List<FileObject> |
FileUtil.getOrder(Collection<FileObject> children,
boolean logWarnings)
Sorts some sibling file objects.
|
protected Collection<? extends FileObject> |
MIMEResolver.UIHelpers.getOrderedResolvers()
Lists registered MIMEResolver instances in reverse order,
i.e.
|
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 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
test.TestFileUtils . |
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.
|
Modifier and Type | Method and Description |
---|---|
String |
StatusDecorator.annotateName(String name,
Set<? extends FileObject> files)
Annotate the name of a file cluster.
|
String |
StatusDecorator.annotateNameHtml(String name,
Set<? extends FileObject> files)
Annotate a name such that the returned value contains HTML markup.
|
Lookup |
FileSystem.findExtrasFor(Set<FileObject> objects)
Finds various extensions for set of file objects coming from
this file system.
|
static List<FileObject> |
FileUtil.getOrder(Collection<FileObject> children,
boolean logWarnings)
Sorts some sibling file objects.
|
static void |
FileUtil.setOrder(List<FileObject> children)
Imposes an order on some sibling file objects.
|
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
|
Constructor and Description |
---|
FileStatusEvent(FileSystem fs,
Set<? extends FileObject> files,
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.
|
Built on June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.