Number: 

Date: 21-Aug-84 10':43':59

Submitter: Sannella.PA

Source: Sannella.PA

Subject: Want device operations for getting/setting info about directories (GETDIRINFO)

Assigned To: 

Attn: Masinter, Jonl

Status: Open

In/By: 

Problem Type: Design - Impl

Impact: Moderate

Difficulty: 

Frequency: 

Priority: Perhaps

System: Operating System

Subsystem: Generic File Operations

Machine: 1108

Disk: 

Lisp Version: 21-Aug-84 06':58':35

Source Files: 

Microcode Version: 5124

Memory Size: 3071

File Server: 

Server Software Version: 

Disposition: 

Description: '
Date': 15 Aug 84 13':57 PDT'
From': Masinter.pa'
Subject': proposal for device operations'
To': LispCore↑'
'
'
FULLNAME(name DIRECTORY) should attempt to recognize "name" as a valid directory.  It should expand host names to their ''canonical form'', and return NIL if there is no such directory. For example':'
'
FULLNAME({rose}<Lisp>) would return {ROSEBOWL}<LISP>.'
'
This needs to work for *all* file devices.'
'
It could then be used by CNDIR etc. and by the directory enumeration code. FULLNAME({DSK} DIRECTORY) should return {DSK1}, {DSK2}, etc. on Dolphins/dorados.'
'
In addition, extend GETFILEINFO to get info about directories.'
'
(GETFILEINFO directory ''SIZE) -- total amount of space available on directory; NIL if not available'
'
(GETFILEINFO directory ''FREEPAGES) -- amount of space not in use on the directory; NIL if not available. Should most certainly work for {FLOPPY}, and any remote device for which the info is available over the ethernet, and for {DSK}.'''
'
This would avoid a proliferation of new functions, and give us a natural way of providing extensions. '
'
Alternative designs solicited, but I think we need to resolve this, hopefully *before* harmony gets released. It would allow for some Harmony between Dolphin and DLion disk.'
'
-----'
'
Date': 15 Aug 84 14':39 PDT'
From': Roach.pa'
Subject': Re': proposal for device operations'
In-reply-to': Masinter.pa''s message of 15 Aug 84 13':57 PDT'
To': Masinter.pa'
cc': LispCore↑.pa'
'
     I proposed something like this sometime back, but instead of corrupting GETFILEINFO as in'
     (GETFILEINFO ''{FLOPPY} ''FREEPAGES)'
I would have a separate function GETFDEVINFO or GETHOSTINFO as in'
     (GETHOSTINFO ''FLOPPY ''FREEPAGES)'
     (GETHOSTINFO ''FLOPPY ''MODE)'
     (GETHOSTINFO ''FLOPPY ''NAME)'
     (GETHOSTINFO ''FLOPPY ''DIRECTORIES)'
     (GETHOSTINFO ''FLOPPY ''VERSION)'
     (SETHOSTINFO ''FLOPPY ''NAME ''FOOBAR)'
     (SETHOSTINFO ''FLOPPY ''MODE ''SYSOUT)'
To keep things clean, it would be good to use GETDIRINFO & SETDIRINFO for directory information'
     (GETDIRINFO ''{FLOPPY}<FOO> ''SIZE)'
     (GETDIRINFO ''{FLOPPY}<FOO> ''FILES)'
     (GETDIRINFO ''{ERIS}<ROACH> ''SIZE)'
     (GETDIRINFO ''{ERIS}<ROACH> ''FREEPAGES)'
     (GETDIRINFO ''{ERIS}<ROACH> ''CREATE.PERMISSION)'
etc.'
'
-----'
'
Date': 16 Aug 84 12':02 PDT'
From': JonL.pa'
Subject': Re': proposal for device operations'
In-reply-to': Masinter.pa''s message of 15 Aug 84 13':57 PDT'
To': Masinter.pa'
cc': LispCore↑.pa'
'
Although the end goal is laudable, I don''t like the corruption of FULLNAME -- especially the generalization of the RECOG argument, since it''s not at all clear that the other functions that take RECOG arugments could fit into the generalization.'
'
Peeking ahead in the mails, I see Kelly''s suggestion for GETDEVINFO and GETDIRINFO;  These would, I think, be preferable to overloading the functionality of FULLNAME and GETFILEINFO (the latter of which ought to return a stream/file-specic piece of information).'
'
-- JonL --'
'
-----'
'
Date': 16 Aug 84 12':35 PDT'
From': vanMelle.pa'
Subject': Re': proposal for device operations'
In-reply-to': Masinter.pa''s message of 15 Aug 84 13':57 PDT'
To': Masinter.pa'
cc': LispCore↑.pa'
'
I am inclined to agree that you are overloading GETFILEINFO, and you are certainly overloading FULLNAME, since DIRECTORY is in no way analogous to other values of RECOG.'
'
But in the case of FULLNAME, there already is a perfectly fine function DIRECTORYNAMEP.  We could simply tighten up its definition to require returning the full directory name, much as INFILEP returns a full file name.  At least the Leaf version of this already does coerce to canonical names': (DIRECTORYNAMEP ''{ROSE}<LISP>) => {ROSEBOWL}<LISP>.'
'
I like GETDIRINFO.  I could imagine combining GETDEVINFO and GETDIRINFO if we want to avoid proliferating names, but it would probably be cleaner to keep them separate.'
'
And what about a generic CREATEDIRECTORY?'
'
	Bill'
'
-----'
'
Date': 16 Aug 84 13':04':51 PDT (Thursday)'
From': masinter.PA'
Subject': Re': proposal for device operations'
In-reply-to': vanMelle''s message of 16 Aug 84 12':35 PDT'
To': vanMelle'
cc': Masinter, LispCore↑'
'
Well, in Unix, IFS, and I think the NS world too, a "directory" is also a file. In fact, FULLNAME({rose}<Lisp> OLD) returns {ROSEBOWL}<LISP>.;1) etc. '
'
It is also appropriate to ask some GETFILEINFO questions about directories, such as AUTHOR, CREATIONDATE, READDATE etc on many of the systems. It is just that directories have some other attributes as well.'
'
These operations don''t work for those ''directories'' that don''t have files on them, like {FLOPPY}. I like the idea of blurring the distinction between "device" and "device/directory"; basically, there is one concept called a "directory".'
'
'
I''m willing to concede that DIRECTORYNAMEP is probably more appropriate than FULLNAME.  GETDIRINFO should probably not overlap keywords with GETFILEINFO, in case we want to merge them later. GETDEVINFO is not so useful, I think.'
'
-----'
'
Date': 16 Aug 84 14':40 PDT'
From': jellinek.pa'
Subject': Re': proposal for device operations'
In-reply-to': Roach.pa''s message of 15 Aug 84 14':39 PDT'
To': Roach.pa'
cc': Masinter.pa, LispCore↑.pa'
Reply-to': jellinek.pa'
'
Speaking as Guardian-of-the-FileBrowser, I second Kelly''s proposal for GETDEVINFO, GETDIRINFO, and friends.'
'
-----'
'
Date': 16 Aug 84 14':47 PDT'
From': JonL.pa'
Subject': Re': proposal for device operations'
In-reply-to': vanMelle.pa''s message of 16 Aug 84 12':35 PDT'
To': vanMelle.pa'
cc': Masinter.pa, Stansbury,LispCore↑.pa'
'
Right on! for CREATEDIRECTORY -- the pilot disk file system should support directories, and I''m not sure why the Floppy doesn''t support them more directly.   Lisp could hardly be complete without it [whereas I think asking for CREATEHOST would be a bit too much] '
'
I suppose there is a pup protocol to IFS''s to determin whether or not one has the privileges of creating a directory.'
'
-- JonL --'
'
'


Workaround: 

Test Case: 

Edit-By: 

Edit-Date: