Skip to content

Commit 06c604b

Browse files
committed
[GR-57735] Deprecate exposed truffle filesystem spi in VirtualFileSystem.
PullRequest: graalpython/3460
2 parents 8b1d905 + 6fee08a commit 06c604b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/utils/VirtualFileSystem.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ void extractResources(Path resourcesDirectory) throws IOException {
653653
}
654654

655655
@Override
656+
@Deprecated
656657
public Path parsePath(URI uri) {
657658
if (uri.getScheme().equals("file")) {
658659
return Paths.get(uri);
@@ -662,11 +663,13 @@ public Path parsePath(URI uri) {
662663
}
663664

664665
@Override
666+
@Deprecated
665667
public Path parsePath(String path) {
666668
return Paths.get(path);
667669
}
668670

669671
@Override
672+
@Deprecated
670673
public void checkAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) throws IOException {
671674
if (pathIsInVfs(path)) {
672675
if (modes.contains(AccessMode.WRITE)) {
@@ -683,6 +686,7 @@ public void checkAccess(Path path, Set<? extends AccessMode> modes, LinkOption..
683686
}
684687

685688
@Override
689+
@Deprecated
686690
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException {
687691
if (delegate == null || pathIsInVfs(dir)) {
688692
throw new SecurityException("read-only filesystem");
@@ -692,6 +696,7 @@ public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOExcept
692696
}
693697

694698
@Override
699+
@Deprecated
695700
public void delete(Path path) throws IOException {
696701
if (delegate == null || pathIsInVfs(path)) {
697702
throw new SecurityException("read-only filesystem");
@@ -701,6 +706,7 @@ public void delete(Path path) throws IOException {
701706
}
702707

703708
@Override
709+
@Deprecated
704710
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
705711
if (delegate != null && !pathIsInVfs(path)) {
706712
return delegate.newByteChannel(path, options, attrs);
@@ -779,6 +785,7 @@ public void close() throws IOException {
779785
}
780786

781787
@Override
788+
@Deprecated
782789
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException {
783790
if (delegate != null && !pathIsInVfs(dir)) {
784791
return delegate.newDirectoryStream(dir, filter);
@@ -804,6 +811,7 @@ public Iterator<Path> iterator() {
804811
}
805812

806813
@Override
814+
@Deprecated
807815
public Path toAbsolutePath(Path path) {
808816
Path result;
809817
if (shouldExtract(path)) {
@@ -815,6 +823,7 @@ public Path toAbsolutePath(Path path) {
815823
}
816824

817825
@Override
826+
@Deprecated
818827
public Path toRealPath(Path path, LinkOption... linkOptions) throws IOException {
819828
Path result;
820829
if (shouldExtract(path)) {
@@ -826,6 +835,7 @@ public Path toRealPath(Path path, LinkOption... linkOptions) throws IOException
826835
}
827836

828837
@Override
838+
@Deprecated
829839
public Map<String, Object> readAttributes(Path path, String attributes, LinkOption... options) throws IOException {
830840
if (delegate != null && !pathIsInVfs(path)) {
831841
return delegate.readAttributes(path, attributes, options);

0 commit comments

Comments
 (0)