本文整理汇总了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 );
}
示例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();
}
}
示例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();
}
}
示例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" );
}
}
示例5: getFileSystem
import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
@Override
public
@Nullable
EightyFileSystem getFileSystem() {
return fileSystem;
}
示例6: _getFileSystem
import de.pfabulist.lindwurm.eighty.EightyFileSystem; //导入依赖的package包/类
public EightyFileSystem _getFileSystem() {
return fileSystem;
}