• getcwd() ideas? toDo?

    From Ragnarok@VERT/DOCKSUD to DOVE-Net.Sync_JavaScript on Sun Feb 10 05:36:00 2008
    Hi ãi think that still is not possible to get the directory of the currentãrunning script.ãi want to get it to use a relative paths to the scriptããsomething such JS_SCRIPT_NAME?ãin the global object?ããalso some ideas:ããusing file class:ãvar f = new File("/etc/apache2/httpd.conf");ãwrite (f.get_dir());ããusing globals:ãwrite (file_getdir('/etc/apache2/httpd.conf'))ããwill show '/etc/apache2'ãããSaludos!ã-- ãDock Sud BBSãhttp://bbs.docksud.com.arãtelnet://bbs.docksud.com.arãã---ã þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.arã
  • From Deuce@VERT/SYNCNIX to Ragnarok on Sun Feb 10 00:53:00 2008
    Re: getcwd() ideas? toDo?ã By: Ragnarok to DOVE-Net.Sync_JavaScript on Sun Feb 10 2008 05:36 amãã > i think that still is not possible to get the directory of the currentã > running script.ã > i want to get it to use a relative paths to the scriptããThat's correct, though I am planning on "fixing" that soon-ish. Possible withãa cwd variable as with the XJS stuff.ãã--- ãSynchronet - Jump on the Web 0.2 bandwagon!ãã---ã þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)ã
  • From Angus McLeod@VERT/ANJO to Ragnarok on Sun Feb 10 09:46:00 2008
    Re: getcwd() ideas? toDo?ã By: Ragnarok to DOVE-Net.Sync_JavaScript on Sun Feb 10 2008 05:36:00ãã > using file class:ã > var f = new File("/etc/apache2/httpd.conf");ã > write (f.get_dir());ã > ã > using globals:ã > write (file_getdir('/etc/apache2/httpd.conf'))ã > ã > will show '/etc/apache2'ãããWithout trailing separator:ãã writeln( "/etc/apache2/httpd.conf".replace( /^(.*)\/.*$/, "$1" ) );ããWITH trailing separator:ãã writeln( "/etc/apache2/httpd.conf".replace( /^(.*\/).*$/, "$1" ) );ããEnjoy!ãã---ãPlaying: "Song for Bob Dylan" by "David Bowie" from the "Hunky dory" album.ãã---ã þ Synchronet þ Making sure Jason works OK at The ANJO
    BBSã