@@ -255,17 +255,17 @@ public static Context.Builder contextBuilder() {
255
255
public static Context .Builder contextBuilder (VirtualFileSystem vfs ) {
256
256
return createContextBuilder ().
257
257
// allow access to the virtual and the host filesystem, as well as sockets
258
- allowIO (IOAccess .newBuilder ().allowHostSocketAccess (true ).fileSystem (vfs ).build ()).
258
+ allowIO (IOAccess .newBuilder ().allowHostSocketAccess (true ).fileSystem (vfs . impl ).build ()).
259
259
// The sys.executable path, a virtual path that is used by the interpreter
260
260
// to discover packages
261
- option ("python.Executable" , vfs .vfsVenvPath () + (VirtualFileSystem .isWindows () ? "\\ Scripts\\ python.exe" : "/bin/python" )).
261
+ option ("python.Executable" , vfs .impl . vfsVenvPath () + (VirtualFileSystemImpl .isWindows () ? "\\ Scripts\\ python.exe" : "/bin/python" )).
262
262
// Set the python home to be read from the embedded resources
263
- option ("python.PythonHome" , vfs .vfsHomePath ()).
263
+ option ("python.PythonHome" , vfs .impl . vfsHomePath ()).
264
264
// Set python path to point to sources stored in
265
265
// src/main/resources/org.graalvm.python.vfs/src
266
- option ("python.PythonPath" , vfs .vfsSrcPath ()).
266
+ option ("python.PythonPath" , vfs .impl . vfsSrcPath ()).
267
267
// pass the path to be executed
268
- option ("python.InputFilePath" , vfs .vfsSrcPath ());
268
+ option ("python.InputFilePath" , vfs .impl . vfsSrcPath ());
269
269
}
270
270
271
271
/**
@@ -311,14 +311,14 @@ public static Context.Builder contextBuilder(VirtualFileSystem vfs) {
311
311
*/
312
312
public static Context .Builder contextBuilder (Path resourcesDirectory ) {
313
313
String execPath ;
314
- if (VirtualFileSystem .isWindows ()) {
315
- execPath = resourcesDirectory .resolve (VirtualFileSystem .VFS_VENV ).resolve ("Scripts" ).resolve ("python.exe" ).toAbsolutePath ().toString ();
314
+ if (VirtualFileSystemImpl .isWindows ()) {
315
+ execPath = resourcesDirectory .resolve (VirtualFileSystemImpl .VFS_VENV ).resolve ("Scripts" ).resolve ("python.exe" ).toAbsolutePath ().toString ();
316
316
} else {
317
- execPath = resourcesDirectory .resolve (VirtualFileSystem .VFS_VENV ).resolve ("bin" ).resolve ("python" ).toAbsolutePath ().toString ();
317
+ execPath = resourcesDirectory .resolve (VirtualFileSystemImpl .VFS_VENV ).resolve ("bin" ).resolve ("python" ).toAbsolutePath ().toString ();
318
318
}
319
319
320
- String homePath = resourcesDirectory .resolve (VirtualFileSystem .VFS_HOME ).toAbsolutePath ().toString ();
321
- String srcPath = resourcesDirectory .resolve (VirtualFileSystem .VFS_SRC ).toAbsolutePath ().toString ();
320
+ String homePath = resourcesDirectory .resolve (VirtualFileSystemImpl .VFS_HOME ).toAbsolutePath ().toString ();
321
+ String srcPath = resourcesDirectory .resolve (VirtualFileSystemImpl .VFS_SRC ).toAbsolutePath ().toString ();
322
322
return createContextBuilder ().
323
323
// allow all IO access
324
324
allowIO (IOAccess .ALL ).
@@ -426,6 +426,6 @@ public static void extractVirtualFileSystemResources(VirtualFileSystem vfs, Path
426
426
if (Files .exists (resourcesDirectory ) && !Files .isDirectory (resourcesDirectory )) {
427
427
throw new IOException (String .format ("%s has to be a directory" , resourcesDirectory .toString ()));
428
428
}
429
- vfs .extractResources (resourcesDirectory );
429
+ vfs .impl . extractResources (resourcesDirectory );
430
430
}
431
431
}
0 commit comments