help-octave
[Top][All Lists]
Advanced

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

Re: generating a user-specific string


From: Judd Storrs
Subject: Re: generating a user-specific string
Date: Tue, 27 Apr 2010 18:40:44 -0400

On Tue, Apr 27, 2010 at 5:15 PM, Qianqian Fang <address@hidden> wrote:
> I don't know if it is possible for octave to return me a
> unique string for each user, so, everyone will be able to
> save to its own folder across multiple sessions.
> tempname is not preferred as it changes everytime,
> which presumably will leave a lot of folders under /tmp.

Since you want the path to be the same across sessions, you could
build the path explicitly off of the username. getenv("USER") will
give you the username as a string and you can concatenate that to
build a directory path. Maybe something like:

usertmpdir = [P_tmpdir filesep "session-" getenv("USER")]


--judd


reply via email to

[Prev in Thread] Current Thread [Next in Thread]