lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Feb 07, 2005, at 01:22, David Burgess wrote:

On windows

os.getenv'TEMP'
is probably as good as you will get.

Ok. Something like:

local tmpDirectory = function()
    local aDirectory = os.getenv( "TEMP" )

    if ( aDirectory == nil ) then
	    aDirectory = "/tmp"
    end

    return aDirectory
end

Would that be a reasonable way to handle this across both Windows and *NIX?

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/