Configuration.unix() .toBuilder() .setSupportedFeatures(ObjectArrays.concat(SYMBOLIC_LINKS, supportedFeatures)) .build()); Files.createDirectories(fs.getPath("dir/b/i/j/l")); Files.createFile(fs.getPath("dir/a"));
for (PathNormalization n : normalizations) { checkNotNull(n); checkNormalizationNotSet(n, none); case NFC: case NFD: checkNormalizationNotSet(n, normalization); normalization = n; break; case CASE_FOLD_UNICODE: case CASE_FOLD_ASCII: checkNormalizationNotSet(n, caseFold); caseFold = n; break;
.setSupportedFeatures(ObjectArrays.concat(SYMBOLIC_LINKS, supportedFeatures)) .build()); Files.createDirectories(fs.getPath("dir/b/i/j/l")); Files.createFile(fs.getPath("dir/a"));
for (PathNormalization n : normalizations) { checkNotNull(n); checkNormalizationNotSet(n, none); case NFC: case NFD: checkNormalizationNotSet(n, normalization); normalization = n; break; case CASE_FOLD_UNICODE: case CASE_FOLD_ASCII: checkNormalizationNotSet(n, caseFold); caseFold = n; break;
/** * Creates the in-memory file system as specified. */ public FileSystem build() throws IOException { FileSystem fileSystem = Jimfs.newFileSystem(config.build()); createContent(Iterables.getOnlyElement(fileSystem.getRootDirectories())); return fileSystem; }
private static FileSystem createFileSystem() { // TODO: use the current platform configuration and get rid of all the agnostic path stuff. Configuration config = Configuration.unix(); config = config.toBuilder() .setWorkingDirectory("/") .setAttributeViews("posix") .build(); return Jimfs.newFileSystem(config); }
/** * Returns a new mutable builder that initially contains the same settings as this configuration. */ public Builder toBuilder() { return new Builder(this); }
/** * Creates a new mutable {@link Configuration} builder using the given path type. */ public static Builder builder(PathType pathType) { return new Builder(pathType); }
/** * Sets the normalizations that will be applied to the display form of filenames. The display * form is used in the {@code toString()} of {@code Path} objects. */ public Builder setNameDisplayNormalization(PathNormalization first, PathNormalization... more) { this.nameDisplayNormalization = checkNormalizations(Lists.asList(first, more)); return this; }
/** * Returns the normalizations that will be applied to the canonical form of filenames in the * file system. The canonical form is used to determine the equality of two filenames when * performing a file lookup. */ public Builder setNameCanonicalNormalization( PathNormalization first, PathNormalization... more) { this.nameCanonicalNormalization = checkNormalizations(Lists.asList(first, more)); return this; }
/** * Returns the normalizations that will be applied to the canonical form of filenames in the * file system. The canonical form is used to determine the equality of two filenames when * performing a file lookup. */ public Builder setNameCanonicalNormalization( PathNormalization first, PathNormalization... more) { this.nameCanonicalNormalization = checkNormalizations(Lists.asList(first, more)); return this; }
/** * Returns a new mutable builder that initially contains the same settings as this configuration. */ public Builder toBuilder() { return new Builder(this); }
/** * Sets the normalizations that will be applied to the display form of filenames. The display * form is used in the {@code toString()} of {@code Path} objects. */ public Builder setNameDisplayNormalization(PathNormalization first, PathNormalization... more) { this.nameDisplayNormalization = checkNormalizations(Lists.asList(first, more)); return this; }
/** * Creates a new mutable {@link Configuration} builder using the given path type. */ public static Builder builder(PathType pathType) { return new Builder(pathType); }