Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion : "absolutize" a path in Luvit
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vladimir Dronnikov  
View profile  
 More options Jul 12 2012, 4:32 am
From: Vladimir Dronnikov <dronni...@gmail.com>
Date: Thu, 12 Jul 2012 12:32:30 +0400
Local: Thurs, Jul 12 2012 4:32 am
Subject: Re: : "absolutize" a path in Luvit
consider joining the club -- #luvit at irc.freenode.net

On Thu, Jul 12, 2012 at 12:26 PM, Enrique Garcia Cota <kik...@gmail.com> wrote:

> I didn't know about __dirname and process.cwd() bits. I will check them out!

>> I'd recommend you to put security efforts to
>> https://github.com/dvv/luvit-static -- it's used to serve
>> http://luvit.io

> I was thinking about implementing a path.expand(filepath, dir) method, but
> for luvit itself. Then it could be used in luvit-static, or any other
> project. I think it is general enough, but I'm not certain (especially since
> node doesn't seem to have an absolutize method neither).

> Let me tinker with the code for a while and see what I can get.

> Enrique

> On Thu, Jul 12, 2012 at 9:51 AM, Vladimir Dronnikov <dronni...@gmail.com>
> wrote:

>> > I have found an easy enough to understand implementation of absolutize
>> > in
>> > rubinious (ruby):

>> > https://github.com/rubinius/rubinius/blob/master/kernel/common/file.r...

>> I'd recommend you to put security efforts to
>> https://github.com/dvv/luvit-static -- it's used to serve
>> http://luvit.io

>> > Two questions:

>> > Does Luvit have access to environment variables (such as $HOME)?

>> `process.env.HOME`

>> > I think I can try to make a patch for Luvit adding this method to path.
>> > Would the Luvit people be interested on it, or is it too specific?

>> we have `__dirname` in modules, plus `process.cwd()` to get absolute
>> current path.
>> So, consider trying
>> `require('path').normalize(require('path').resolve(process.cwd(),
>> '../aa/../b'))` first to see if it fits

>> --Vladimir


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.