本文整理了Java中org.eclipse.core.filesystem.EFS.createFileInfo()
方法的一些代码示例,展示了EFS.createFileInfo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EFS.createFileInfo()
方法的具体详情如下:
包路径:org.eclipse.core.filesystem.EFS
类名称:EFS
方法名:createFileInfo
[英]Creates an empty file information object. The resulting information will represent a non-existent file with no name and no attributes set.
[中]创建一个空文件信息对象。结果信息将表示一个不存在的文件,没有名称,也没有设置属性。
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources
/**
* Converts a ResourceAttributes object into an IFileInfo object.
* @param attributes The resource attributes
* @return The file info
*/
public static IFileInfo attributesToFileInfo(ResourceAttributes attributes) {
IFileInfo fileInfo = EFS.createFileInfo();
fileInfo.setAttribute(EFS.ATTRIBUTE_READ_ONLY, attributes.isReadOnly());
fileInfo.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, attributes.isExecutable());
fileInfo.setAttribute(EFS.ATTRIBUTE_ARCHIVE, attributes.isArchive());
fileInfo.setAttribute(EFS.ATTRIBUTE_HIDDEN, attributes.isHidden());
fileInfo.setAttribute(EFS.ATTRIBUTE_SYMLINK, attributes.isSymbolicLink());
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_READ, attributes.isSet(EFS.ATTRIBUTE_GROUP_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, attributes.isSet(EFS.ATTRIBUTE_GROUP_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_GROUP_EXECUTE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_READ, attributes.isSet(EFS.ATTRIBUTE_OTHER_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, attributes.isSet(EFS.ATTRIBUTE_OTHER_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_OTHER_EXECUTE));
return fileInfo;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources
/**
* Converts a ResourceAttributes object into an IFileInfo object.
* @param attributes The resource attributes
* @return The file info
*/
public static IFileInfo attributesToFileInfo(ResourceAttributes attributes) {
IFileInfo fileInfo = EFS.createFileInfo();
fileInfo.setAttribute(EFS.ATTRIBUTE_READ_ONLY, attributes.isReadOnly());
fileInfo.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, attributes.isExecutable());
fileInfo.setAttribute(EFS.ATTRIBUTE_ARCHIVE, attributes.isArchive());
fileInfo.setAttribute(EFS.ATTRIBUTE_HIDDEN, attributes.isHidden());
fileInfo.setAttribute(EFS.ATTRIBUTE_SYMLINK, attributes.isSymbolicLink());
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_READ, attributes.isSet(EFS.ATTRIBUTE_GROUP_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, attributes.isSet(EFS.ATTRIBUTE_GROUP_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_GROUP_EXECUTE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_READ, attributes.isSet(EFS.ATTRIBUTE_OTHER_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, attributes.isSet(EFS.ATTRIBUTE_OTHER_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_OTHER_EXECUTE));
return fileInfo;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources
/**
* Converts a ResourceAttributes object into an IFileInfo object.
* @param attributes The resource attributes
* @return The file info
*/
public static IFileInfo attributesToFileInfo(ResourceAttributes attributes) {
IFileInfo fileInfo = EFS.createFileInfo();
fileInfo.setAttribute(EFS.ATTRIBUTE_READ_ONLY, attributes.isReadOnly());
fileInfo.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, attributes.isExecutable());
fileInfo.setAttribute(EFS.ATTRIBUTE_ARCHIVE, attributes.isArchive());
fileInfo.setAttribute(EFS.ATTRIBUTE_HIDDEN, attributes.isHidden());
fileInfo.setAttribute(EFS.ATTRIBUTE_SYMLINK, attributes.isSymbolicLink());
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_READ, attributes.isSet(EFS.ATTRIBUTE_GROUP_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, attributes.isSet(EFS.ATTRIBUTE_GROUP_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_GROUP_EXECUTE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_READ, attributes.isSet(EFS.ATTRIBUTE_OTHER_READ));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, attributes.isSet(EFS.ATTRIBUTE_OTHER_WRITE));
fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, attributes.isSet(EFS.ATTRIBUTE_OTHER_EXECUTE));
return fileInfo;
}
内容来源于网络,如有侵权,请联系作者删除!