本文整理汇总了Java中de.pfabulist.kleinod.nio.PathSpecWindows类的典型用法代码示例。如果您正苦于以下问题:Java PathSpecWindows类的具体用法?Java PathSpecWindows怎么用?Java PathSpecWindows使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PathSpecWindows类属于de.pfabulist.kleinod.nio包,在下文中一共展示了PathSpecWindows类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WindowsBuilder
import de.pfabulist.kleinod.nio.PathSpecWindows; //导入依赖的package包/类
public WindowsBuilder( FSDescription descr, T t ) {
super( descr, t );
descr.removeTopic( Unix.class );
PathLimits pathLimits = new PathLimits( OS.WINDOWS );
PathSpec pathSpec = new PathSpecWindows();
descr.props.put( Tests10PathWithContent.ONE_CHAR_COUNT, pathLimits.getBigChar() );
descr.props.put( Tests10PathWithContent.MAX_FILENAME_LENGTH, pathSpec.getMaxFilenameLength() );
descr.props.put( Tests10PathWithContent.MAX_PATH_LENGTH, pathSpec.getMaxPathLength() );
descr.props.put( Tests10PathWithContent.GET_FILENAME_LENGTH, (Function<String,Integer>)pathSpec::getFilenameLength );
descr.props.put( Tests10PathWithContent.GET_PATH_LENGTH, (Function<String,Integer>)pathSpec::getPathLength );
descr.removeTopic( Posix.class );
descr.removeTopic( MoveWhile.class );
descr.removeTopic( NonCasePreserving.class );
descr.removeTopic( FileKeyT.class );
descr.attributeDescriptions.put( "dos",
attributeBuilding( DosAttributesT.class, "dos", DosFileAttributeView.class, DosFileAttributes.class ).
addAttribute( "hidden", DosFileAttributes::isHidden ).
addAttribute( "archive", DosFileAttributes::isArchive ).
addAttribute( "system", DosFileAttributes::isSystem ).
addAttribute( "readonly", DosFileAttributes::isReadOnly ).
build() );
}
示例2: testWindows1
import de.pfabulist.kleinod.nio.PathSpecWindows; //导入依赖的package包/类
@Test
public void testWindows1() throws Exception {
GetPathConverter gp = new GetPathConverter( new PathSpecWindows(), "a", "..", "c" );
assertThat( gp.isAbsolute() ).isFalse();
assertThat( gp.getAll() ).isEqualTo( Arrays.asList( "a", "..", "c" ) );
}
示例3: getPathSpec
import de.pfabulist.kleinod.nio.PathSpecWindows; //导入依赖的package包/类
@Override
public PathSpec getPathSpec() {
return new PathSpecWindows();
}
示例4: windows
import de.pfabulist.kleinod.nio.PathSpecWindows; //导入依赖的package包/类
public static MemoryFSBuilder windows() {
return new MemoryFSBuilder().
pathSpec( new PathSpecWindows() ).
primaryStoreName( "c:").
attributeView( DosFileAttributeView.class );
}