Esempio n. 1
0
        public override object get(Uri uri, object @base)
        {
            File f = File.make(uri, false);

            if (f.exists())
            {
                return(f);
            }
            throw UnresolvedErr.make(uri).val;
        }
Esempio n. 2
0
        public override object get(Uri uri, object @base)
        {
            // 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));
        }