@Override public InputStream newInputStream(Path path, OpenOption... options) throws IOException { JimfsPath checkedPath = checkPath(path); ImmutableSet<OpenOption> opts = Options.getOptionsForInputStream(options); FileSystemView view = getDefaultView(checkedPath); RegularFile file = view.getOrCreateRegularFile(checkedPath, opts, NO_ATTRS); return new JimfsInputStream(file, view.state()); }
@Override public InputStream newInputStream(Path path, OpenOption... options) throws IOException { JimfsPath checkedPath = checkPath(path); ImmutableSet<OpenOption> opts = Options.getOptionsForInputStream(options); FileSystemView view = getDefaultView(checkedPath); RegularFile file = view.getOrCreateRegularFile(checkedPath, opts, NO_ATTRS); return new JimfsInputStream(file, view.state()); }