[Seaside] TFFiler: creates file containers to store external files in Monticello

Tony Fleig tony.fleig at gmail.com
Wed Feb 9 10:46:33 UTC 2011


Hi Bernat,

Ok. I have checked in a new version of TFFiler to
http://www.squeaksource.com/TFFiler.html with the following comment:

Added methods #fullRestorePathFor:, #fullRestorePathFor:In:, and
#targetDirectoryPath to the generated file container class. Added
comments in generated methods. Minor refactoring.

I hope it does what you need.

There are three new methods in the file container classes that are
created by TFFiler:

#targetDirectoryPath
    answers the path relative to the default directory into which
files will be placed by #restoreDirectory.

#fullRestorePathFor: aRestorePath
    answers the default full file system path that will be used to
restore the file identified by the aRestorePath.

#fullRestorePathFor: aRestorePath In: aDirectoryPath
    answers the full file system path that will be used to restore the
file identified by aRestorePath when the file is restored to
aDirectoryPath.

I'm curious as to what makes these methods useful to you.

Regards,
TF

Blog: http://www.tonyfleig.com/smallthoughts

On Wed, Feb 9, 2011 at 12:37 AM, AxiNat <tibabenfortlapalanca at gmail.com> wrote:
> Hi Tony,
> Exactly, I meant the full system path of a file that's stored in a container
> class, something like:
>
> localFilePathFor: aFileName
> ^  (FileDirectory default / relativePathToFile / aFileName) pathName
>
> I'm using TFFiler in my app and it works very well, thanks again!
> Cheers,
> Bernat.
> 2011/2/8 Tony Fleig <tony.fleig at gmail.com>
>>
>> Hi Bernat,
>>
>> You mean the full system path of a file that is stored in a container
>> class? That is, the location to which the file would be restored by
>> #restoreDirectory?
>>
>> Or do you mean the full system path of an arbitrary file in the file
>> system?
>>
>> TF
>>
>> On Mon, Feb 7, 2011 at 4:44 AM, AxiNat <tibabenfortlapalanca at gmail.com>
>> wrote:
>> > I'd like to suggest a feature, some method like:
>> > TFFiler class >> fullPathOf: aFileName
>> > That returns the full system path for a given file.
>> > Cheers,
>> > Bernat.
>> > 2011/2/7 AxiNat <tibabenfortlapalanca at gmail.com>
>> >>
>> >> Tony, great work!
>> >> I'll be using this one in production too :)
>> >> Bernat Romagosa.
>> >> 2011/2/4 Sven Van Caekenberghe <sven at beta9.be>
>> >>>
>> >>> Great idea Tony, this is indeed quite useful.
>> >>>
>> >>> Thanks (again) for sharing this and for doing all the documentation
>> >>> work!
>> >>>
>> >>> Sven
>> >>>
>> >>> On 04 Feb 2011, at 19:17, Tony Fleig wrote:
>> >>>
>> >>> > I've published a tool I'm using called TFFiler.
>> >>> >
>> >>> > My problem was that I had a number of external files that were
>> >>> > required for my Seaside web application. These were CSS, Javascript,
>> >>> > and image files that had to be placed in a specific directory tree
>> >>> > structure. When I moved my web app to another system, I always had
>> >>> > to
>> >>> > remember to reconstruct the external directory tree. Over time, the
>> >>> > directory tree got larger and more complex.
>> >>> >
>> >>> > For deployment, I wanted the files to be served by Apache and not
>> >>> > the
>> >>> > Seaside ExternalFileLibrary. (ExternalFileLibrary was the most
>> >>> > convenient approach during development.) This meant the directory
>> >>> > tree
>> >>> > should be moved to a location other than the Pharo Resources
>> >>> > directory, which was the most convenient location during
>> >>> > development.
>> >>> >
>> >>> > The current version of Monticello does not provide a way to save
>> >>> > external files with a project. TFFiler addresses this shortcoming.
>> >>> > Now
>> >>> > when I load my project from Monticello the necessary external files
>> >>> > are deployed automatically.
>> >>> >
>> >>> > Maybe someone else will find this useful as well.
>> >>> >
>> >>> > http://www.tonyfleig.com/smallthoughts/blog/tffiler
>> >>> > http://www.squeaksource.com/TFFiler
>> >>> >
>> >>> > Regards,
>> >>> > TF
>> >>> > _______________________________________________
>> >>> > seaside mailing list
>> >>> > seaside at lists.squeakfoundation.org
>> >>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>>
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>> seaside at lists.squeakfoundation.org
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >
>> >
>> > _______________________________________________
>> > seaside mailing list
>> > seaside at lists.squeakfoundation.org
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> >
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


More information about the seaside mailing list