The Inbox: SMBase-fbs.133.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: SMBase-fbs.133.mcz

commits-2
Frank Shearar uploaded a new version of SMBase to project The Inbox:
http://source.squeak.org/inbox/SMBase-fbs.133.mcz

==================== Summary ====================

Name: SMBase-fbs.133
Author: fbs
Time: 11 September 2014, 9:09:02.509 pm
UUID: 7946d888-3215-2c4f-acdf-f2e7deedfbc0
Ancestors: SMBase-nice.132

Following on from Chris Muller's suggestion, improve all three FileDirectory-using methods.

=============== Diff against SMBase-nice.132 ===============

Item was changed:
  ----- Method: SMFileCache>>directoryForPackage: (in category 'accessing') -----
  directoryForPackage: aPackage
  "Returns the local path for storing the package cache's package file area.
  This also ensures that the path exists."
 
+ ^ (self directory / 'packages' / aPackage id asString36) assureExistence.!
- | slash path dir |
- slash := FileDirectory slash.
- path := 'packages' , slash , aPackage id asString36 , slash.
- dir := FileDirectory default on: self directory fullName, slash, path.
- dir assureExistence.
- ^dir!

Item was changed:
  ----- Method: SMFileCache>>directoryForPackageRelease: (in category 'accessing') -----
  directoryForPackageRelease: aPackageRelease
  "Returns the local path for storing the package cache's version of a  
  package file. This also ensures that the path exists."
 
+ ^ (self directory / 'packages' / aPackageRelease package id asString36 / aPackageRelease automaticVersionString) assureExistence!
- | slash path dir |
- slash := FileDirectory slash.
- path := 'packages' , slash , aPackageRelease package id asString36 , slash , aPackageRelease automaticVersionString.
- dir := FileDirectory default on: self directory fullName, slash, path.
- dir assureExistence.
- ^dir!

Item was changed:
  ----- Method: SMFileCache>>directoryForResource: (in category 'accessing') -----
  directoryForResource: aResource
  "Returns the local path for storing the package cache's version of a  
  resource file. This also ensures that the path exists."
 
+ ^ (self directory / 'resources' / aResource id asString36) assureExistence.!
- | slash path dir |
- slash := FileDirectory slash.
- path := 'resources' , slash , aResource id asString36.
- dir := FileDirectory default on: self directory fullName, slash, path.
- dir assureExistence.
- ^dir!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: SMBase-fbs.133.mcz

Frank Shearar-3
On 11 September 2014 21:09,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of SMBase to project The Inbox:
> http://source.squeak.org/inbox/SMBase-fbs.133.mcz
>
> ==================== Summary ====================
>
> Name: SMBase-fbs.133
> Author: fbs
> Time: 11 September 2014, 9:09:02.509 pm
> UUID: 7946d888-3215-2c4f-acdf-f2e7deedfbc0
> Ancestors: SMBase-nice.132
>
> Following on from Chris Muller's suggestion, improve all three FileDirectory-using methods.
>
> =============== Diff against SMBase-nice.132 ===============

I liked Chris Muller's suggestion so much I thought I ought to update
the other SMFileCache methods too. It's in the Inbox, because this
code isn't covered by tests so I'm not convinced that it actually
works :)

frank