Permalink
Browse files

Bump CC:T version (again!)

  • Loading branch information...
SquidDev committed Nov 3, 2018
1 parent 5d00615 commit 0120796ef35288fa0721ea69488f3b195d0deb14
@@ -6,7 +6,7 @@ repositories {
}
dependencies {
api 'org.squiddev:cc-tweaked:1.80pr1.9'
api 'org.squiddev:cc-tweaked:1.80pr1.10'
api 'org.slf4j:slf4j-api:1.7.25'
@@ -3,6 +3,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.channels.ReadableByteChannel;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Collectors;
@@ -12,6 +13,7 @@
import com.google.common.collect.Streams;
import dan200.computercraft.api.filesystem.IMount;
import dan200.computercraft.core.apis.handles.ArrayByteChannel;
/**
* An immutable, in-memory {@link dan200.computercraft.api.filesystem.IMount
@@ -117,6 +119,17 @@ public InputStream openForRead(@Nonnull String path) throws IOException {
}
}
@Nonnull
@Override
public ReadableByteChannel openChannelForRead(@Nonnull String path) throws IOException {
VirtualMountEntry e = follow(path);
if (e instanceof VirtualFile) {
return new ArrayByteChannel(((VirtualFile) e).getData());
} else {
throw new IOException("Only files can be read");
}
}
@SuppressWarnings("all")
@Nonnull
public VirtualDirectory getRoot() {

0 comments on commit 0120796

Please sign in to comment.