當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。