org.commonjava.maven.galley.model.Transfer.mkdirs()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中org.commonjava.maven.galley.model.Transfer.mkdirs()方法的一些代码示例,展示了Transfer.mkdirs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transfer.mkdirs()方法的具体详情如下:
包路径:org.commonjava.maven.galley.model.Transfer
类名称:Transfer
方法名:mkdirs

Transfer.mkdirs介绍

暂无

代码示例

代码示例来源:origin: org.commonjava.indy/indy-dot-maven-common

@Override
public void createFolder( final ITransaction transaction, final String folderUri )
  throws WebdavException
{
  final StoreURIMatcher matcher = new StoreURIMatcher( folderUri );
  if ( !matcher.hasStorePath() )
  {
    throw new WebdavException( "No store-level path specified: '" + folderUri
      + "'. This URI references either a list of stores, a root store directory, or something else equally read-only." );
  }
  final StorageAdvice advice = getStorageAdviceFor( matcher );
  final String path = matcher.getStorePath();
  final Transfer item = fileManager.getStorageReference( advice.getHostedStore(), path );
  try
  {
    item.mkdirs();
  }
  catch ( final IOException e )
  {
    logger.error( "Failed to create folder: {} in store: {}. Reason: {}", e, path, advice.getStore()
                                               .getKey(), e.getMessage() );
    throw new WebdavException( "Failed to create folder: " + folderUri );
  }
}

代码示例来源:origin: org.commonjava.aprox/aprox-dot-maven-common

@Override
public void createFolder( final ITransaction transaction, final String folderUri )
  throws WebdavException
{
  final StoreURIMatcher matcher = new StoreURIMatcher( folderUri );
  if ( !matcher.hasStorePath() )
  {
    throw new WebdavException( "No store-level path specified: '" + folderUri
      + "'. This URI references either a list of stores, a root store directory, or something else equally read-only." );
  }
  final StorageAdvice advice = getStorageAdviceFor( matcher );
  final String path = matcher.getStorePath();
  final Transfer item = fileManager.getStorageReference( advice.getHostedStore(), path );
  try
  {
    item.mkdirs();
  }
  catch ( final IOException e )
  {
    logger.error( "Failed to create folder: {} in store: {}. Reason: {}", e, path, advice.getStore()
                                               .getKey(), e.getMessage() );
    throw new WebdavException( "Failed to create folder: " + folderUri );
  }
}

相关文章