本文整理了Java中org.tinygroup.vfs.VFS.resolveFile()
方法的一些代码示例,展示了VFS.resolveFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VFS.resolveFile()
方法的具体详情如下:
包路径:org.tinygroup.vfs.VFS
类名称:VFS
方法名:resolveFile
暂无
代码示例来源:origin: org.tinygroup/org.tinygroup.flowbasiccomponent
public static boolean existsFile(String filePath) {
FileObject fileObject = VFS.resolveFile(filePath);
if (fileObject.isExist()) {
return true;
}
return false;
}
代码示例来源:origin: org.tinygroup/org.tinygroup.docgen
public void generate(String path, Context context, OutputStream writer) {
try {
FileObject fileObject = VFS.resolveFile(path);
generate(fileObject, context, writer);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.tinygroup/fileresolver
public void addSearchPath(String searchPath) {
searchPathList.add(searchPath);
FileObject fileObject = VFS.resolveFile(searchPath);
addFileObject(fileObject);
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileresolver
public void addSearchPath(String searchPath) {
FileObject fileObject = VFS.resolveFile(searchPath);
searchPathMap.put(searchPath, fileObject);
addFileObject(fileObject);
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileindexsource
public List<Document> getDocument(final String type, final File file,
final Object... arguments) {
final FileObject data = VFS.resolveFile(file.getAbsolutePath());
return super.getDocument(type, data, arguments);
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileresolver
public void addResolvePath(List<String> paths) {
for (String path : paths) {
addResolveFileObject(VFS.resolveFile(path));
}
}
代码示例来源:origin: org.tinygroup/mdatool
/**
* 为指定路径的模型文件或指定目录下的模型文件进行处理 为其中需要快速生成默认操作和视图的模型进行处理
*
* @param path
*/
public void find(String findPath, String findModelName) {
this.modelName = findModelName;
FileObject file = VFS.resolveFile(findPath);
resolve(file);
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileresolver
public void addResolvePath(String path) {
addResolveFileObject(VFS.resolveFile(path));
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileresolver
public FileObject getRootFileObject(String path) {
String fullPath = getFileObject(path).getAbsolutePath();
return VFS.resolveFile(fullPath.substring(0,
fullPath.length() - path.length() + 1));
}
代码示例来源:origin: org.tinygroup/fileresolver
public FileObject getRootFileObject(String path) {
String fullPath = getFileObject(path).getAbsolutePath();
return VFS.resolveFile(fullPath.substring(0,
fullPath.length() - path.length() + 1));
}
代码示例来源:origin: org.tinygroup/org.tinygroup.fileresolver
private void resolverScanPath() {
List<FileObject> classPaths = new ArrayList<FileObject>();
for (String filePath : allScanningPath) {
FileObject fileObject = VFS.resolveFile(filePath);
classPaths.add(fileObject);
long modifiedTime = fileObject.getLastModifiedTime();
fileDateMap.put(fileObject.getAbsolutePath(), modifiedTime);
}
resolveClassPaths(classPaths);
}
代码示例来源:origin: org.tinygroup/velocity
public long getLastModified(Resource resource) {
long lastModifiedTime = VFS.resolveFile(resource.getName())
.getLastModifiedTime();
resourceModifiedTimeMap.put(resource.getName(), lastModifiedTime);
return lastModifiedTime;
}
代码示例来源:origin: org.tinygroup/org.tinygroup.velocity
public long getLastModified(Resource resource) {
long lastModifiedTime = VFS.resolveFile(resource.getName())
.getLastModifiedTime();
resourceModifiedTimeMap.put(resource.getName(), lastModifiedTime);
return lastModifiedTime;
}
代码示例来源:origin: org.tinygroup/fileresolver
private void refreshScanPath() {
Set<FileObject> classPaths = new HashSet<FileObject>();
for (String file : allScanningPath) {
FileObject fileObject = VFS.resolveFile(file);
if (fileObject.isExist()
&& fileObject.getSchemaProvider().getSchema().equals("file:")) {
classPaths.add(fileObject);
}
}
resolveClassPaths(classPaths);
resolveDeletedFile();
}
代码示例来源:origin: org.tinygroup/org.tinygroup.xmlsignature
private PublicKey loadPublicKey(XmlSignatureConfig config) throws Exception {
String storeType = StringUtil.isEmpty(config.getPublicStoreType()) ? "X.509" : config.getPublicStoreType();
CertificateFactory cf = CertificateFactory.getInstance(storeType);
FileObject file = VFS.resolveFile(config.getPublicKeyPath());
if (!file.isExist()) {
throw new Exception(String.format("[%s]没有找到匹配的公钥,请检查配置", config.getPublicKeyPath()));
}
Certificate c = cf.generateCertificate(file.getInputStream());
return c.getPublicKey();
}
代码示例来源:origin: org.tinygroup/org.tinygroup.xmlsignature
private PrivateKey loadPrivateKey(XmlSignatureConfig config) throws Exception {
String storeType = StringUtil.isEmpty(config.getPrivateStoreType()) ? KeyStore.getDefaultType() : config.getPrivateStoreType();
KeyStore keyStore = KeyStore.getInstance(storeType);
FileObject file = VFS.resolveFile(config.getPrivateKeyPath());
if (!file.isExist()) {
throw new Exception(String.format("[%s]没有找到匹配的私钥,请检查配置", config.getPrivateKeyPath()));
}
char[] password = config.getPassword().toCharArray();
keyStore.load(file.getInputStream(), password);
return (PrivateKey) keyStore.getKey(config.getAlias(), password);
}
代码示例来源:origin: org.tinygroup/service
private void load() {
logger.logMessage(LogLevel.DEBUG, "开始扫描Serivce文件");
FileObject file = VFS.resolveFile(path);
load(file);
logger.logMessage(LogLevel.DEBUG, "Serivce文件扫描结束");
}
代码示例来源:origin: org.tinygroup/velocity
public boolean isSourceModified(Resource resource) {
Long oldTime = resourceModifiedTimeMap.get(resource.getName());
if (oldTime == null || oldTime != getLastModified(resource)) {
return true;
}
long lastModifiedTime = VFS.resolveFile(resource.getName())
.getLastModifiedTime();
return oldTime == lastModifiedTime;
}
代码示例来源:origin: org.tinygroup/org.tinygroup.velocity
public boolean isSourceModified(Resource resource) {
Long oldTime = resourceModifiedTimeMap.get(resource.getName());
if (oldTime == null || oldTime != getLastModified(resource)) {
return true;
}
long lastModifiedTime = VFS.resolveFile(resource.getName())
.getLastModifiedTime();
return oldTime == lastModifiedTime;
}
代码示例来源:origin: org.tinygroup/org.tinygroup.flowbasiccomponent
public void execute(Context context) {
LOGGER.logMessage(LogLevel.INFO, "文件存在判断组件开始执行");
int code = FlowComponentConstants.DEFAULT_CODE;
FileObject fileObject = VFS.resolveFile(filePath);
if (fileObject.isExist()) {
code = FlowComponentConstants.EXIST_CODE;
}
context.put(resultKey, code);
LOGGER.logMessage(LogLevel.INFO, "文件存在判断组件执行结束");
}
内容来源于网络,如有侵权,请联系作者删除!