#1324 Fan Scheme

go4 Mon 22 Nov 2010

The doc Fan Scheme say

fan://pod/Type           =>  sys::Type
fan://pod/Type#slot      =>  sys::Slot (Field or Method)

But I can not work here,Did I miss something?

ivan Mon 22 Nov 2010

Looks like the doc is out of sync, here's FanScheme.get method impl:

// don't support anything but relative fan: URIs right now
if (uri.auth() == null)
  throw ArgErr.make("Invalid format for fan: URI - " + uri).val;

// lookup pod
String podName = (String)uri.auth();
Pod pod = Pod.find(podName, false);
if (pod == null) throw UnresolvedErr.make(uri.toStr()).val;
if (uri.pathStr().length() == 0) return pod;

// dive into file of pod
return pod.file(uri);

So it does allow to retrieve sys::Pod instance, but anything beyond pod name just routes to resource files in pod.

Login or Signup to reply.