本文整理了Java中org.eclipse.core.filesystem.EFS.getNullFileSystem()
方法的一些代码示例,展示了EFS.getNullFileSystem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EFS.getNullFileSystem()
方法的具体详情如下:
包路径:org.eclipse.core.filesystem.EFS
类名称:EFS
方法名:getNullFileSystem
[英]Returns the null file system. The null file system can be used to represent a non-existent or unresolved file system. An example of a null file system is a file system whose location is relative to an undefined variable, or a system whose scheme is unknown.
Basic handle-based queries can be performed on the null file system, but all operations that actually require file system access will fail.
[中]返回空文件系统。空文件系统可用于表示不存在或未解析的文件系统。空文件系统的一个示例是位置相对于未定义变量的文件系统,或者方案未知的系统。
可以在空文件系统上执行基于句柄的基本查询,但所有实际需要访问文件系统的操作都将失败。
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources
@Override
public IFileStore getChild(String name) {
return EFS.getNullFileSystem().getStore(new Path(name).makeAbsolute());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources
@Override
public IFileStore getChild(String name) {
return EFS.getNullFileSystem().getStore(new Path(name).makeAbsolute());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources
@Override
public IFileStore getChild(String name) {
return EFS.getNullFileSystem().getStore(new Path(name).makeAbsolute());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.filesystem
/**
* This is the default implementation of {@link IFileSystem#getStore(IPath)}.
* This implementation forwards to {@link IFileSystem#getStore(URI)},
* assuming that the provided path corresponds to the path component of the
* URI for the file store.
* <p>
* Subclasses may override this method. If it is not possible to create a file
* store corresponding to the provided path for this file system, a file store
* belonging to the null file system should be returned
* </p>
*
* @param path A path to a file store within the scheme of this file system.
* @return A handle to a file store in this file system
* @see IFileSystem#getStore(IPath)
* @see EFS#getNullFileSystem()
*/
@Override
public IFileStore getStore(IPath path) {
try {
return getStore(new URI(scheme, path.toString(), null));
} catch (URISyntaxException e) {
return EFS.getNullFileSystem().getStore(path);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.filesystem
/**
* This is the default implementation of {@link IFileSystem#getStore(IPath)}.
* This implementation forwards to {@link IFileSystem#getStore(URI)},
* assuming that the provided path corresponds to the path component of the
* URI for the file store.
* <p>
* Subclasses may override this method. If it is not possible to create a file
* store corresponding to the provided path for this file system, a file store
* belonging to the null file system should be returned
* </p>
*
* @param path A path to a file store within the scheme of this file system.
* @return A handle to a file store in this file system
* @see IFileSystem#getStore(IPath)
* @see EFS#getNullFileSystem()
*/
@Override
public IFileStore getStore(IPath path) {
try {
return getStore(new URI(scheme, path.toString(), null));
} catch (URISyntaxException e) {
return EFS.getNullFileSystem().getStore(path);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.filesystem
/**
* This is the default implementation of {@link IFileSystem#getStore(IPath)}.
* This implementation forwards to {@link IFileSystem#getStore(URI)},
* assuming that the provided path corresponds to the path component of the
* URI for the file store.
* <p>
* Subclasses may override this method. If it is not possible to create a file
* store corresponding to the provided path for this file system, a file store
* belonging to the null file system should be returned
* </p>
*
* @param path A path to a file store within the scheme of this file system.
* @return A handle to a file store in this file system
* @see IFileSystem#getStore(IPath)
* @see EFS#getNullFileSystem()
*/
@Override
public IFileStore getStore(IPath path) {
try {
return getStore(new URI(scheme, path.toString(), null));
} catch (URISyntaxException e) {
return EFS.getNullFileSystem().getStore(path);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources
/**
* Never returns null
* @param target
* @return The file store for this resource
*/
public IFileStore getStore(IResource target) {
try {
return getStoreRoot(target).createStore(target.getFullPath(), target);
} catch (CoreException e) {
//callers aren't expecting failure here, so return null file system
return EFS.getNullFileSystem().getStore(target.getFullPath());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources
/**
* Never returns null
* @param target
* @return The file store for this resource
*/
public IFileStore getStore(IResource target) {
try {
return getStoreRoot(target).createStore(target.getFullPath(), target);
} catch (CoreException e) {
//callers aren't expecting failure here, so return null file system
return EFS.getNullFileSystem().getStore(target.getFullPath());
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources
/**
* Never returns null
* @param target
* @return The file store for this resource
*/
public IFileStore getStore(IResource target) {
try {
return getStoreRoot(target).createStore(target.getFullPath(), target);
} catch (CoreException e) {
//callers aren't expecting failure here, so return null file system
return EFS.getNullFileSystem().getStore(target.getFullPath());
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources
/**
* Creates an IFileStore for a given workspace path. The prefix of the path of
* the returned IFileStore corresponding to this root is canonicalized.
* @exception CoreException If the file system for that resource is undefined
*/
IFileStore createStore(IPath workspacePath, IResource resource) throws CoreException {
IPath childPath = workspacePath.removeFirstSegments(chop);
IFileStore rootStore;
final URI uri = resource.getPathVariableManager().resolveURI(getCanonicalRoot());
if (!uri.isAbsolute()) {
//handles case where resource location cannot be resolved
//such as unresolved path variable or invalid file system scheme
return EFS.getNullFileSystem().getStore(workspacePath);
}
rootStore = EFS.getStore(uri);
if (childPath.segmentCount() == 0)
return rootStore;
return rootStore.getFileStore(childPath);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources
/**
* Creates an IFileStore for a given workspace path. The prefix of the path of
* the returned IFileStore corresponding to this root is canonicalized.
* @exception CoreException If the file system for that resource is undefined
*/
IFileStore createStore(IPath workspacePath, IResource resource) throws CoreException {
IPath childPath = workspacePath.removeFirstSegments(chop);
IFileStore rootStore;
final URI uri = resource.getPathVariableManager().resolveURI(getCanonicalRoot());
if (!uri.isAbsolute()) {
//handles case where resource location cannot be resolved
//such as unresolved path variable or invalid file system scheme
return EFS.getNullFileSystem().getStore(workspacePath);
}
rootStore = EFS.getStore(uri);
if (childPath.segmentCount() == 0)
return rootStore;
return rootStore.getFileStore(childPath);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources
/**
* Creates an IFileStore for a given workspace path. The prefix of the path of
* the returned IFileStore corresponding to this root is canonicalized.
* @exception CoreException If the file system for that resource is undefined
*/
IFileStore createStore(IPath workspacePath, IResource resource) throws CoreException {
IPath childPath = workspacePath.removeFirstSegments(chop);
// For a linked resource itself we have to use its root, but for its children we prefer
// to use the canonical root since it provides for faster file system access.
// See http://bugs.eclipse.org/507084
final URI uri = resource.getPathVariableManager().resolveURI(resource.isLinked() ? root : getCanonicalRoot());
if (!uri.isAbsolute()) {
// Handles case where resource location cannot be resolved such as
// unresolved path variable or invalid file system scheme.
return EFS.getNullFileSystem().getStore(workspacePath);
}
IFileStore rootStore = EFS.getStore(uri);
if (childPath.segmentCount() == 0)
return rootStore;
return rootStore.getFileStore(childPath);
}
内容来源于网络,如有侵权,请联系作者删除!