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


Java EightyFileSystem类代码示例

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


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

示例1: getFileAttributeView

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
public <V extends FileAttributeView> Optional<V> getFileAttributeView( EightyPath path, final Class<V> type, LinkOption... options ) {
    if( !isViewSupported( type ) ) {
        return Optional.empty();
    }

    if( !existsEx( path, options ) ) {
        return Optional.of( getFileAttributeViewDummy( path, type ) );
    }

    EightyPath real = toRealPathEx( path, options );

    EightyFileSystem eightyFileSystem = path._getFileSystem();
    EightyFS efs = eightyFileSystem.get80();

    V fav = getSymLinkSensitiveFileAttributeView( type, real, efs );

    handleReadOnlyFileSystems( eightyFileSystem, fav );

    return Optional.of( fav );
}
 
开发者ID:openCage,项目名称:eightyfs,代码行数:21,代码来源:AttributeProvider.java

示例2: handleReadOnlyFileSystems

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
private <V extends FileAttributeView> void handleReadOnlyFileSystems( EightyFileSystem eightyFileSystem, V fav ) {
    if( eightyFileSystem.isReadOnly() ) {
        if( !( fav instanceof ReadonlySettable ) ) {
            throw new UnsupportedOperationException( "the attribute view need to implement ReadonlySettable in order to make Readonly Filesystems work" );
        }

        ( (ReadonlySettable) ( fav ) ).setReadonly();
    }
}
 
开发者ID:openCage,项目名称:eightyfs,代码行数:10,代码来源:AttributeProvider.java

示例3: EightyPath

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
protected EightyPath( EightyFileSystem fileSystem, Optional<String> rootStr, boolean absolute, List<String> elems ) {
        this.fileSystem = fileSystem;
        this.elems = elems;
        this.rootComponent = rootStr;
        this.absolute = absolute;

        if( elems.size() > 1 && elems.contains( "" ) ) {
            throw new IllegalStateException( "empty path segment" );
        }

//        if ( elems.isEmpty() && !rootComponent.isPresent()) {
//            todo();
//        }

//        if ( absolute && elems.size() == 1 && elems.get(0).isEmpty()) {
//            todo();
//        }

        noDots = !elems.contains( "." ) && !elems.contains( ".." );

        String pathToString = ( absolute ? fileSystem.getSeparator() : "" ) +
                elems.stream().collect( Collectors.joining( fileSystem.getSeparator() ) );

        // was: string = ( rootComponent.orElse( "" ) ) + pathToString;
        // but if struct and getNormform means that only windows stores 2 strings
        if( rootComponent.isPresent() ) {
            string = rootComponent.get() + pathToString;
        } else {
            string = pathToString;
        }

        normalString = fileSystem.get80().getPathSpec().getNormalForm( pathToString );

        if( string.contains( "//" ) ) {
            todo();
        }

    }
 
开发者ID:openCage,项目名称:eightyfs,代码行数:39,代码来源:EightyPath.java

示例4: checkContract

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
private void checkContract( Path path ) {
    if( !path.isAbsolute() ) {
        throw new IllegalArgumentException( "EightFileSystem only works with absolute paths " + path );
    }

    if( ( (EightyFileSystem) path.getFileSystem() ).get80() != this ) {
        throw new IllegalArgumentException( "path called on incorrect 80" );
    }
}
 
开发者ID:openCage,项目名称:memoryfs,代码行数:10,代码来源:MemoryFS.java

示例5: getFileSystem

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
@Override
public
@Nullable
EightyFileSystem getFileSystem() {
    return fileSystem;
}
 
开发者ID:openCage,项目名称:eightyfs,代码行数:7,代码来源:EightyPath.java

示例6: _getFileSystem

import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
public EightyFileSystem _getFileSystem() {
    return fileSystem;
}
 
开发者ID:openCage,项目名称:eightyfs,代码行数:4,代码来源:EightyPath.java


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