Wednesday, December 12, 2018

Linux file interface is loadable

 Untested,but I just make the file internal calls available to whoever is using the linux bus.  If you scripting engine can extract and work with the results, then you have a powerful architecture to manage file systems with arbitrary choice of scripting syntax. Like shunt, change the semantics, but the loadable interfaces never change.  The return path can be structured on the args list, shunt reorders an expression right back to args. So when utilities know the return path, they can structure return data to fit syntax engines.

 int Entry(int*argc,void *args[]) {
 int idx = *argc;
 if(!strcmp("Mkdir",args[idx]) { mkdir(args[idx+1], agrs[idx+2]); idx+=2;}
 if(!strcmp("Rmdir",args[idx]) { rmdir(args[idx+1]);idx+=1;}
 if(!strcmp("GetPath",args[idx]) { getcwd(args[idx+1], args[idx+2]);idx += 2;}
 if(!strcmp("Chdir",args[idx])    {chdir(args[idx+1];idx+=1;}
 if(idx >L *args) {
*argc=idx;
return(1)
} else return(0)
 }

No comments: