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


Java FileSystemView类代码示例

本文整理汇总了Java中org.apache.sshd.common.file.FileSystemView的典型用法代码示例。如果您正苦于以下问题:Java FileSystemView类的具体用法?Java FileSystemView怎么用?Java FileSystemView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FileSystemView类属于org.apache.sshd.common.file包,在下文中一共展示了FileSystemView类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NewScpHelper

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
public NewScpHelper(@Nonnull final InputStream in, @Nonnull final OutputStream out,
                @Nonnull final FileSystemView root, final LoggingHelper loggingHelper, @Nonnull Environment env,
                @Nonnull Map<String, String> envToAfPropertyMapping) {
    super(in, out, root);
    this.loggingHelper = loggingHelper;
    this.env = env;
    this.envToAfPropertyMapping = envToAfPropertyMapping;
}
 
开发者ID:yahoo,项目名称:artifactory_ssh_proxy,代码行数:9,代码来源:NewScpHelper.java

示例2: getFailureScpCommand

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
@SuppressWarnings({"boxing", "resource"})
NewScpCommand getFailureScpCommand(int returnVal, ExitCallback callback) throws IOException {
    String filePath = "/mep-testing-gradle/foo/bar/maven-metadata.xml";
    FileSystemView viewMock = Mockito.mock(FileSystemView.class);

    Mockito.when(viewMock.getFile(Matchers.any(SshFile.class), Matchers.anyString())).thenReturn(null);

    OutputStream osMock = Mockito.mock(OutputStream.class);
    InputStream isMock = Mockito.mock(InputStream.class);
    LoggingHelper loggingHelper = Mockito.mock(LoggingHelper.class);

    Mockito.when(isMock.read()).thenReturn(returnVal);

    final NewScpHelper helperMocked = new NewScpHelper(isMock, osMock, viewMock, loggingHelper, null, null) {
        @Override
        public String readLine() throws IOException {
            return "filename";
        }

    };


    SshRequestLog requestLog = Mockito.mock(SshRequestLog.class);
    NewScpCommand scpCommand = new NewScpCommand("scp -t " + filePath, requestLog, null) {
        @Override
        protected NewScpHelper createScpHelper() {
            return helperMocked;
        }
    };

    scpCommand.setFileSystemView(viewMock);
    scpCommand.setOutputStream(osMock);
    scpCommand.setInputStream(isMock);
    scpCommand.setExitCallback(callback);

    return scpCommand;
}
 
开发者ID:yahoo,项目名称:artifactory_ssh_proxy,代码行数:38,代码来源:TestNewScpCommand.java

示例3: createFileSystemView

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
@Override
public FileSystemView createFileSystemView(Session session) {
    Map<String, String> roots = new HashMap<String, String>();
    roots.put("/", computeRootDir(session.getUsername()));
    return new NativeFileSystemView(session.getUsername(), roots, "/");
}
 
开发者ID:signed,项目名称:in-memory-infrastructure,代码行数:7,代码来源:SubDirectoryForEachUserSystemFactory.java

示例4: createFileSystemView

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
/**
 * Create the appropriate user file system view.
 */
@Override
public FileSystemView createFileSystemView(final Session session) {
    final String userName = session.getUsername();
    return new ArtifactoryFileSystemView(afInfo, userName, isCaseInsensitive(), artifactoryAuthorizer);
}
 
开发者ID:yahoo,项目名称:artifactory_ssh_proxy,代码行数:9,代码来源:ArtifactoryFileSystemFactory.java

示例5: setFileSystemView

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
public void setFileSystemView(FileSystemView view) {
    this.root = view;
}
 
开发者ID:Gadreel,项目名称:divconq,代码行数:4,代码来源:SftpSubsystem.java

示例6: getNormalizedView

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
@Override
public FileSystemView getNormalizedView() {
	return this;
}
 
开发者ID:Gadreel,项目名称:divconq,代码行数:5,代码来源:FileSystemViewImpl.java

示例7: createFileSystemView

import org.apache.sshd.common.file.FileSystemView; //导入依赖的package包/类
public FileSystemView createFileSystemView(Session session) {
Map<String, String> roots = new HashMap<>();

roots.put("/", "/Work/Temp/Dest");

return new NativeFileSystemView("brad", roots, "/");

//ApiSession api = this.severinfo.getApiSession(session);

      //return new FileSystemViewImpl(api);
  }
 
开发者ID:Gadreel,项目名称:divconq,代码行数:12,代码来源:FileSystemFactoryImpl.java


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