当前位置: 首页>>代码示例>>Java>>正文


Java FileSystemException.getMessage方法代码示例

本文整理汇总了Java中org.apache.commons.vfs2.FileSystemException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java FileSystemException.getMessage方法的具体用法?Java FileSystemException.getMessage怎么用?Java FileSystemException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.vfs2.FileSystemException的用法示例。


在下文中一共展示了FileSystemException.getMessage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkScript

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private void checkScript()
{
	long lastModified;
	try
	{
		lastModified = VFSUtils.resolveFile(".", _scriptFile).getContent()
				.getLastModifiedTime();
	}
	catch (FileSystemException e)
	{
		throw new IllegalArgumentException("Cannot find script "
				+ _scriptFile + " ex=" + e.getMessage());
	}
	if (_lastModified == lastModified)
		return;
	else
	{
		_lastModified = lastModified;
		_script = ScriptFactory.createScript(_scriptFile, _counterString,
				null, _args, _log, 0, null, false, 0, 1);
		if (_script == null)
			throw new IllegalArgumentException("Cannot find script "
					+ _scriptFile);
	}
}
 
开发者ID:yajsw,项目名称:yajsw,代码行数:26,代码来源:ScriptCounter.java

示例2: onChildrenChanged

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
/**
 * Called when the children of this file change.
 * 
 * @param child the child
 * @param newType the new type
 */
@Override
protected void onChildrenChanged(FileName child, FileType newType) {
    if (children != null && newType.equals(FileType.IMAGINARY)) {
        try {
            children.remove(UriParser.decode(child.getBaseName()));
        } catch (FileSystemException e) {
            throw new RuntimeException(e.getMessage());
        }
    } else {
        // if child was added we have to rescan the children
        children = null;
    }
}
 
开发者ID:clstoulouse,项目名称:motu,代码行数:20,代码来源:GsiFtpFileObject.java

示例3: getPidFiles

import org.apache.commons.vfs2.FileSystemException; //导入方法依赖的package包/类
private FileObject[] getPidFiles(Project project) throws URISyntaxException,
          FileSystemException {
    ZeppelinConfig zepConf = zeppelinConfFactory.getProjectConf(project.getName());
    if(zepConf==null){
      return new FileObject[0];
    }
    ZeppelinConfiguration conf = zepConf.getConf();
    URI filesystemRoot;
    FileSystemManager fsManager;
    String runPath = conf.getRelativeDir("run");
    try {
      filesystemRoot = new URI(runPath);
    } catch (URISyntaxException e1) {
      throw new URISyntaxException("Not a valid URI", e1.getMessage());
    }

    if (filesystemRoot.getScheme() == null) { // it is local path
      try {
        filesystemRoot = new URI(new File(runPath).getAbsolutePath());
      } catch (URISyntaxException e) {
        throw new URISyntaxException("Not a valid URI", e.getMessage());
      }
    }
    FileObject[] pidFiles = null;
    try {
      fsManager = VFS.getManager();
//      pidFiles = fsManager.resolveFile(filesystemRoot.toString() + "/").
      pidFiles = fsManager.resolveFile(filesystemRoot.getPath()).getChildren();
    } catch (FileSystemException ex) {
      throw new FileSystemException("Directory not found: " + filesystemRoot.
              getPath(), ex.getMessage());
    }
    return pidFiles;
  }
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:35,代码来源:ZeppelinResource.java


注:本文中的org.apache.commons.vfs2.FileSystemException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。