help-octave
[Top][All Lists]
Advanced

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

Re: Distribute "data files" with a package


From: Daniel Kraft
Subject: Re: Distribute "data files" with a package
Date: Tue, 1 Apr 2014 08:27:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi!

On 2014-03-31 16:11, Sergei Steshenko wrote:
>> On 31.03.2014 13:41, Daniel Kraft wrote:
>>
>>>  ... Is there a
>>>  function that can be called from within an .m file and that returns the
>>>  directory that contains the .m file?
>>
>> help mfilename
>>
>> I don't know if this is a good design choice but I think you can find
>> your file with mfilename ("fullpath") and fileparts, fullfile...
>
> Yep, 'mfilename; is a good solution.
> 
> I use it to 'source' other .m file and which current .m file depends, and I 
> define directory structure, so I know where to look for the needed files.

Thanks, I didn't know about mfilename.  This sounds indeed like what I
need.  (Also thanks for those who suggested to use "which", this is also
a nice idea I didn't think about.  For my case, using mfilename feels
cleaner, though.)

Yours,
Daniel

-- 
http://www.domob.eu/
OpenPGP: 901C 5216 0537 1D2A F071  5A0E 4D94 6EED 04F7 CF52
Namecoin: id/domob -> https://nameid.org/?name=domob
--
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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