changeset 267:1507149fc447

rename Io.get() to Io.Uri() git-svn-id: https://luan-java.googlecode.com/svn/trunk@268 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 29 Oct 2014 22:05:55 +0000
parents 4dca283b9b74
children 266d677c535d
files core/src/luan/modules/IoLuan.java core/src/luan/modules/PackageLuan.java web/src/luan/modules/web/Web_server.luan
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/core/src/luan/modules/IoLuan.java	Wed Oct 29 16:31:48 2014 +0000
+++ b/core/src/luan/modules/IoLuan.java	Wed Oct 29 22:05:55 2014 +0000
@@ -41,7 +41,7 @@
 			try {
 				add( module, "read_console_line", String.class );
 				module.put( "protocols", newProtocols() );
-				add( module, "get", LuanState.class, String.class, Boolean.class );
+				add( module, "Uri", LuanState.class, String.class, Boolean.class );
 				module.put( "stdin", stdin.table() );
 				add( module, "socket_server", Integer.TYPE );
 			} catch(NoSuchMethodException e) {
@@ -552,7 +552,7 @@
 		return t;
 	}
 
-	public static LuanTable get(LuanState luan,String name,Boolean loading) throws LuanException {
+	public static LuanTable Uri(LuanState luan,String name,Boolean loading) throws LuanException {
 		int i = name.indexOf(':');
 		if( i == -1 )
 			throw luan.exception( "invalid Io name '"+name+"', missing protocol" );
--- a/core/src/luan/modules/PackageLuan.java	Wed Oct 29 16:31:48 2014 +0000
+++ b/core/src/luan/modules/PackageLuan.java	Wed Oct 29 22:05:55 2014 +0000
@@ -88,7 +88,7 @@
 	}
 
 	static LuanFunction loader(LuanState luan,String name,boolean loading) throws LuanException {
-		LuanTable t = IoLuan.get(luan,name,loading);
+		LuanTable t = IoLuan.Uri(luan,name,loading);
 		if( t == null )
 			return null;
 		LuanFunction loader = (LuanFunction)t.get("loader");
--- a/web/src/luan/modules/web/Web_server.luan	Wed Oct 29 16:31:48 2014 +0000
+++ b/web/src/luan/modules/web/Web_server.luan	Wed Oct 29 22:05:55 2014 +0000
@@ -74,14 +74,14 @@
 	dir = dir.gsub("/$","")  -- remove trailing '/' if any
 	Http.dir = dir
 	function Io.protocols.site(path,loading)
-		return Io.get( dir..path, loading )
+		return Io.Uri( dir..path, loading )
 	end
 	authentication_handler.setPassword(private_password)
 	local base = dir
 	if base.match("^classpath:") ~= nil then
 		base = dir.."#"..welcome_file.."#"..welcome_file..".luan"
 	end
-	resource_handler.setResourceBase(Io.get(base).to_string())
+	resource_handler.setResourceBase(Io.Uri(base).to_string())
 	resource_handler.setWelcomeFiles {welcome_file}
 	luan_handler.setWelcomeFile(welcome_file)
 	local server = Server.new(port)