Jake's Radio Tips : Jake's cool tips for Radio UserLand users.
Updated: 5/4/02; 10:50:17 PM.

 


Radio Stuff:

Themes:

Click to see the XML version of this web page.

 
 

Sunday, February 3, 2002

David Davies asked me earlier today, how to get the path to a local file, given the URL for its upstreamed and rendered version. Here's a code-snippet that does it:

local (weblogurl = radio.weblog.getUrl ());
local (relpath = string.delete (url, 1, sizeOf (weblogurl)));
local (f = radio.file.getAbsolutePath (relpath));

That will work fine for an image file, but if you need the path to a rendered file. If you need to convert an .html url back to the correct filepath. Add this extra step:

radio.file.locateFileIgnoringExtension (f, @f);
1:51:46 AM    


© Copyright 2002 Jake Savin.



Click here to visit the Radio UserLand website.

 


February 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    
Jan   Mar