Re: Directory handling

Mark Evenson <[email protected]> Wed, 12 Jun 2019 16:49:29 +0200
Newsgroups gmane.editors.j.devel
Message-ID <0A525D32-04BD-47EF-98B2-27F4C259E39E__22370.6245467596$1560351007$gmane$org@panix.com>

> On Jun 12, 2019, at 08:28, Marco Antoniotti <[email protected]> wrote:
> 
> Hi
> 
> 
> 
>> On Jun 11, 2019, at 11:33 , Mark Evenson <[email protected]> wrote:
>> 
>> 
>> 
>>> On Jun 5, 2019, at 17:53, Marco Antoniotti <[email protected]> wrote:
>>> 
>>> Dear all,
>>> 
>>> I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
>>> 
>>> Could you tell me how to get to this functionality?
>> 

[…]

>> If you wish invoke purely Lisp-side functionality, then use the value of CL:*DEFAULT-PATHNAMES-DEFAULTS*, which is what UIOP/OS:GETCWD returns.  
> 
> That is what I fall back to.  I was just wondering if there was a “to-the-file-system” primitive.  *D-P-D* munging will do.

The ultimate “to-the-file-system” primitive is to construct a CL:PATHNAME object via a uri with the “file" scheme, e.g:  #p"file:///var/tmp/“ or #p”file:///Users/Kilroy/Downloads/movie.mov”.  You can then apply CL:DIRECTORY and CL:TRUENAME to your heart’s content to manipulate things.  

> 
>> 
>> The code which sets platform features is the [best source of what keywords identify which plaform features][2].  Additionaly, there is (incomplete) support for identifying the JVM version by the use of the :java-1.6, :java-1.7, and :java—1.8 keywords.  Again, it would be helpful to know what sort of platform features you wish to detect. 
>> 
>> 
>> [2]: https://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/Lisp.java#L2362
> 
> Thanks.  I just wanted to know what set of features I can use to know that I am running on a Mac OS X or, say, a Windows 10.  It looks like that (and :UNIX :DARWIN) is what I need for Mac OS X and WINDOWS for all Windows.

Yep, that’s correct. 


-- 
"A screaming comes across the sky.  It has happened before but there is nothing 
to compare to it now."