public UnixBuilder<T> hfsPlus() { PathLimits pathLimits = new PathLimits( OS.OSX ); PathSpec pathSpec = new PathSpecOSX(); 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.addTopic( CaseInsensitive.class ); descr.removeTopic( NotOSX.class ); // todo : is seperator (in a way) return this; }
public static MemoryFSBuilder osx() { return new MemoryFSBuilder(). pathSpec( new PathSpecOSX()). attributeView( PosixFileAttributeView.class ); }
static PathSpec byOS( OS os ) { if ( os.isWindows() ) { return new PathSpecWindows(); } if ( os.isOSX() ) { return new PathSpecOSX(); } if ( os.isUnix() ) { return new PathSpecUnix(); } return new PathSpecDefault(); }