[squeak-dev] The Trunk: Files-cmm.159.mcz
ma.chris.m at gmail.com
Fri Jul 22 02:57:08 UTC 2016
Hi Tobias, this is just a fix, not a change. The 2007 refactor was
intended for applications to migrate to the use of the DirectoryEntry
hierarchy, so you can (and should) now write this instead:
FileDirectory default / 'myDir' / 'aSubDir' / 'foo'
readWriteStreamDo: [:stream | ..]
The intent always was to add them lazily, as needed. I have just
committed that along with one of my other recent improvements.
On Thu, Jul 21, 2016 at 4:06 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> On 21.07.2016, at 22:57, Chris Muller <asqueaker at gmail.com> wrote:
>> This does change the return type in the case of a directory from a
>> FileDirectory to a DirectoryEntryDirectory.
>> The intention is to gradually migrate most of FileDirectory's public
>> api to DirectoryEntryDirectory, and let FileDirectory be concerned
>> with the platform-specific access issues.
>> In the meantime, the most compatible thing to do for backward
>> compatibility with the old #/ is to send #asFileDirectory to the
> I'm not ok with this change.
> It makes
> FileDirectory default / 'myDir' / 'aSubDir' oldFileNamed: 'foo' do: [:stream | ..]
> unduly complex.
> If we were about to migrate, we should migrate to FileSytem, I'd say. :)
> best regards
>> On Thu, Jul 21, 2016 at 3:44 PM, <commits at source.squeak.org> wrote:
>>> Chris Muller uploaded a new version of Files to project The Trunk:
>>> ==================== Summary ====================
>>> Name: Files-cmm.159
>>> Author: cmm
>>> Time: 21 July 2016, 3:44:04.16263 pm
>>> UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641
>>> Ancestors: Files-eem.158
>>> Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file.
>>> =============== Diff against Files-eem.158 ===============
>>> Item was changed:
>>> ----- Method: FileDirectory>>/ (in category 'path access') -----
>>> / aString
>>> "Answer a FileDirectory on a subdirectory named aString, of the receiver."
>>> + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)!
>>> - ^ FileDirectory on: (self fullNameFor: aString)!
More information about the Squeak-dev