Hi All,<div><br></div><div> just noticed that</div><div><br></div><div> UnixFileDirectory default directoryExists: UnixFileDirectory default asString, '/.'</div><div><br></div><div>answers false, since directoryNames excludes '.' and '..' (justifiable, and changing this might break all manner of things). i.e.</div>
<div><br></div><div>FileDirectory>directoryExists: filenameOrPath</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Answer true if a directory of the given name exists. The given name may be either a full path name or a local directory within this directory."</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>"FileDirectory default directoryExists: FileDirectory default pathName"</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| fName dir |</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>DirectoryClass splitName: filenameOrPath to:</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>[:filePath :name |</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>fName := name.</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>filePath isEmpty</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifTrue: [dir := self]</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifFalse: [dir := self directoryNamed: filePath]].</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^dir exists and: [</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>self isCaseSensitive </div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>ifTrue:[dir directoryNames includes: fName]</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>ifFalse:[dir directoryNames anySatisfy: [:name| name sameAs: fName]]].</div><div><br></div><div><br></div><div>So how about</div><div><br></div><div>FileDirectory class methods for accessing</div>
<div>currentDirectoryNickname</div><div> ^'.'</div><div><br></div><div><div>FileDirectory>directoryExists: filenameOrPath</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Answer true if a directory of the given name exists. The given name may be either a full path name or a local directory within this directory."</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>"FileDirectory default directoryExists: FileDirectory default pathName"</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| fName dir |</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>DirectoryClass splitName: filenameOrPath to:</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>[:filePath :name |</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>fName := name.</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>filePath isEmpty</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifTrue: [dir := self]</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifFalse: [dir := self directoryNamed: filePath]].</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^dir exists</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>and: [fName = self class currentDirectoryNickname</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>or: [self isCaseSensitive </div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>ifTrue:[dir directoryNames includes: fName]</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>ifFalse:[dir directoryNames anySatisfy: [:name| name sameAs: fName]]]]</div><div><br></div>-- <br>best,<div>Eliot</div><br>
</div>