Hi Tony,<div><br></div><div>My case is that I have to call a gnu-smalltalk interpreter from Pharo, and I need to specify which image is the interpreter to run, so at one point I need the image local file path, see the following line: </div>
<div><br></div><div>(...) 'gst -I ', (STFGSTImages <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 11px; border-collapse: collapse; ">fullRestorePathFor:</span> 'myGSTImage.im')</div>
<div><br></div><div>I know you can do that without using TFFiler, but as that's the package that restores my files into the file system I thought it'd be nice if it could also tell you where did it store them in case you need to access them from outside Pharo, as in my case.</div>
<div><br></div><div>I haven't tried it yet, but this afternoon I'll give you some feedback. Thanks a lot again!</div><div><br></div><div>Bernat.</div><div><br><div class="gmail_quote">2011/2/9 Tony Fleig <span dir="ltr"><<a href="mailto:tony.fleig@gmail.com">tony.fleig@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Bernat,<br>
<br>
Ok. I have checked in a new version of TFFiler to<br>
<a href="http://www.squeaksource.com/TFFiler.html" target="_blank">http://www.squeaksource.com/TFFiler.html</a> with the following comment:<br>
<br>
Added methods #fullRestorePathFor:, #fullRestorePathFor:In:, and<br>
#targetDirectoryPath to the generated file container class. Added<br>
comments in generated methods. Minor refactoring.<br>
<br>
I hope it does what you need.<br>
<br>
There are three new methods in the file container classes that are<br>
created by TFFiler:<br>
<br>
#targetDirectoryPath<br>
answers the path relative to the default directory into which<br>
files will be placed by #restoreDirectory.<br>
<br>
#fullRestorePathFor: aRestorePath<br>
answers the default full file system path that will be used to<br>
restore the file identified by the aRestorePath.<br>
<br>
#fullRestorePathFor: aRestorePath In: aDirectoryPath<br>
answers the full file system path that will be used to restore the<br>
file identified by aRestorePath when the file is restored to<br>
aDirectoryPath.<br>
<br>
I'm curious as to what makes these methods useful to you.<br>
<br>
Regards,<br>
TF<br>
<br>
Blog: <a href="http://www.tonyfleig.com/smallthoughts" target="_blank">http://www.tonyfleig.com/smallthoughts</a><br>
<div><div></div><div class="h5"><br>
On Wed, Feb 9, 2011 at 12:37 AM, AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>> wrote:<br>
> Hi Tony,<br>
> Exactly, I meant the full system path of a file that's stored in a container<br>
> class, something like:<br>
><br>
> localFilePathFor: aFileName<br>
> ^ (FileDirectory default / relativePathToFile / aFileName) pathName<br>
><br>
> I'm using TFFiler in my app and it works very well, thanks again!<br>
> Cheers,<br>
> Bernat.<br>
> 2011/2/8 Tony Fleig <<a href="mailto:tony.fleig@gmail.com">tony.fleig@gmail.com</a>><br>
>><br>
>> Hi Bernat,<br>
>><br>
>> You mean the full system path of a file that is stored in a container<br>
>> class? That is, the location to which the file would be restored by<br>
>> #restoreDirectory?<br>
>><br>
>> Or do you mean the full system path of an arbitrary file in the file<br>
>> system?<br>
>><br>
>> TF<br>
>><br>
>> On Mon, Feb 7, 2011 at 4:44 AM, AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>><br>
>> wrote:<br>
>> > I'd like to suggest a feature, some method like:<br>
>> > TFFiler class >> fullPathOf: aFileName<br>
>> > That returns the full system path for a given file.<br>
>> > Cheers,<br>
>> > Bernat.<br>
>> > 2011/2/7 AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>><br>
>> >><br>
>> >> Tony, great work!<br>
>> >> I'll be using this one in production too :)<br>
>> >> Bernat Romagosa.<br>
>> >> 2011/2/4 Sven Van Caekenberghe <<a href="mailto:sven@beta9.be">sven@beta9.be</a>><br>
>> >>><br>
>> >>> Great idea Tony, this is indeed quite useful.<br>
>> >>><br>
>> >>> Thanks (again) for sharing this and for doing all the documentation<br>
>> >>> work!<br>
>> >>><br>
>> >>> Sven<br>
>> >>><br>
>> >>> On 04 Feb 2011, at 19:17, Tony Fleig wrote:<br>
>> >>><br>
>> >>> > I've published a tool I'm using called TFFiler.<br>
>> >>> ><br>
>> >>> > My problem was that I had a number of external files that were<br>
>> >>> > required for my Seaside web application. These were CSS, Javascript,<br>
>> >>> > and image files that had to be placed in a specific directory tree<br>
>> >>> > structure. When I moved my web app to another system, I always had<br>
>> >>> > to<br>
>> >>> > remember to reconstruct the external directory tree. Over time, the<br>
>> >>> > directory tree got larger and more complex.<br>
>> >>> ><br>
>> >>> > For deployment, I wanted the files to be served by Apache and not<br>
>> >>> > the<br>
>> >>> > Seaside ExternalFileLibrary. (ExternalFileLibrary was the most<br>
>> >>> > convenient approach during development.) This meant the directory<br>
>> >>> > tree<br>
>> >>> > should be moved to a location other than the Pharo Resources<br>
>> >>> > directory, which was the most convenient location during<br>
>> >>> > development.<br>
>> >>> ><br>
>> >>> > The current version of Monticello does not provide a way to save<br>
>> >>> > external files with a project. TFFiler addresses this shortcoming.<br>
>> >>> > Now<br>
>> >>> > when I load my project from Monticello the necessary external files<br>
>> >>> > are deployed automatically.<br>
>> >>> ><br>
>> >>> > Maybe someone else will find this useful as well.<br>
>> >>> ><br>
>> >>> > <a href="http://www.tonyfleig.com/smallthoughts/blog/tffiler" target="_blank">http://www.tonyfleig.com/smallthoughts/blog/tffiler</a><br>
>> >>> > <a href="http://www.squeaksource.com/TFFiler" target="_blank">http://www.squeaksource.com/TFFiler</a><br>
>> >>> ><br>
>> >>> > Regards,<br>
>> >>> > TF<br>
>> >>> > _______________________________________________<br>
>> >>> > seaside mailing list<br>
>> >>> > <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> >>> > <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> seaside mailing list<br>
>> >>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> >>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>> >><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > seaside mailing list<br>
>> > <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> > <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> seaside mailing list<br>
>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
><br>
> _______________________________________________<br>
> seaside mailing list<br>
> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br></div>