script property

  1. @Deprecated('Use NativePlatform.current!.script instead')
Uri get script
inherited

The absolute URI of the script being run in this isolate.

Warning

This property is deprecated on Platform. It is only implemented by the legacy LocalPlatform and FakePlatform classes, and cannot be accessed through Platform.current. Use NativePlatform to access these properties instead, accessed as NativePlatform.current.

If the script argument on the command line is relative, it is resolved to an absolute URI before fetching the script, and this absolute URI is returned.

URI resolution only does string manipulation on the script path, and this may be different from the file system's path resolution behavior. For example, a symbolic link immediately followed by '..' will not be looked up.

If the executable environment does not support script an empty Uri is returned.

Implementation

@Deprecated('Use NativePlatform.current!.script instead')
Uri get script =>
    throw UnimplementedError('Use NativePlatform.current!.script instead');