org.uberfire.backend.vfs.Path.getFileSystem()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(94)

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

Path.getFileSystem介绍

暂无

代码示例

代码示例来源:origin: org.kie.guvnor/guvnor-commons-ui

private Path stripFileName( final Path path ) {
  String uri = path.toURI();
  uri = uri.replace( path.getFileName(), "" );
  return PathFactory.newPath( path.getFileSystem(), path.getFileName(), uri );
}

代码示例来源:origin: org.kie.guvnor/guvnor-commons-ui

public void save(final Path path,
         final CommandWithCommitMessage saveCommand) {
  checkNotNull("command", saveCommand);
  if (path.getFileSystem().supportedFileAttributeViews().contains("version")) {
    new SavePopup(saveCommand).show();
  } else {
    saveCommand.execute("");
  }
}

代码示例来源:origin: org.kie.guvnor/guvnor-core-services-backend

@Override
public Path rename( final Path path,
          final String newName,
          final String comment ) {
  System.out.println( "USER:" + identity.getName() + " RENAMING asset [" + path.getFileName() + "] to [" + newName + "]" );
  String originalFileName = path.getFileName().substring( path.getFileName().lastIndexOf( "/" ) + 1 );
  final String extension = originalFileName.substring( originalFileName.indexOf( "." ) );
  final String targetName = path.getFileName().substring( 0, path.getFileName().lastIndexOf( "/" ) + 1 ) + newName + extension;
  final String targetURI = path.toURI().substring( 0, path.toURI().lastIndexOf( "/" ) + 1 ) + newName + extension;
  final Path targetPath = PathFactory.newPath( path.getFileSystem(),
                         targetName,
                         targetURI );
  ioService.move( paths.convert( path ),
          paths.convert( targetPath ),
          new CommentedOption( identity.getName(), comment ) );
  resourceRenamedEvent.fire( new ResourceRenamedEvent( path,
                             targetPath ) );
  return targetPath;
}

代码示例来源:origin: org.kie.guvnor/guvnor-core-services-backend

@Override
public Path copy( final Path path,
         final String newName,
         final String comment ) {
  System.out.println( "USER:" + identity.getName() + " COPYING asset [" + path.getFileName() + "] to [" + newName + "]" );
  String originalFileName = path.getFileName().substring( path.getFileName().lastIndexOf( "/" ) + 1 );
  final String extension = originalFileName.substring( originalFileName.indexOf( "." ) );
  final String targetName = path.getFileName().substring( 0, path.getFileName().lastIndexOf( "/" ) + 1 ) + newName + extension;
  final String targetURI = path.toURI().substring( 0, path.toURI().lastIndexOf( "/" ) + 1 ) + newName + extension;
  final Path targetPath = PathFactory.newPath( path.getFileSystem(),
                         targetName,
                         targetURI );
  ioService.copy( paths.convert( path ),
          paths.convert( targetPath ),
          new CommentedOption( identity.getName(), comment ) );
  resourceCopiedEvent.fire( new ResourceCopiedEvent( path,
                            targetPath ) );
  return targetPath;
}

代码示例来源:origin: org.kie.guvnor/guvnor-metadata-widget

public void onClick( ClickEvent event ) {
  final Path path = PathFactory.newPath( metadata.getPath().getFileSystem(), metadata.getPath().getFileName(), history.getValue( history.getSelectedIndex() ) );
  placeManager().goTo( new ReadOnlyPathPlaceRequest( path ) );
}

相关文章

微信公众号

最新文章

更多