[haiku-development] Re: [GSoC proposal] IMAP FS - An outsider's thoughts

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 15 Apr 2011 14:41:43 -0700

On Fri, Apr 15, 2011 at 09:35:16AM +0200, Stephan Aßmus wrote:
> Am 15.04.2011 01:29, schrieb Donn Cave:
> >See, to me, a filesystem is a way that you can do everything with cat.
> >
> >If we already have a mail daemon, and we are going to need a mail app
> >anyway to make anything happen with special ioctls, we might as well
> >use BFS and just assign a mail application to manage the files in the
> >way you describe, with a scripting interface for any external applications
> >that might want to be involved.  Not much extra value added by making it
> >a special filesystem.
> Exactly. I think there is no advantage in doing IMAP as an FS if a 
> special ioctl is needed. In my other reply I have tried to explain why I 
> think it's a better idea to deal with possible delays in the clients.
 I've been following this discussion, but haven't commented because
I've never delved into the area much.  However, I'm beginning to think
that something basic is being missed... [Or maybe it's just me that's
missing something (:-/)]

To me, the advantage of a 'file' as it's known to most FSs is that it
is just a linear bunch of bytes.  Any structure to the data in the file
is provided by the app(s) that handle that particular type of file.

A mail message, though, *does* have a particular structure (header,
text body and possible attachments), so it's always going to need
specific apps to handle it.  Exposing entire mail messages in a
file-system seems to me to have no advantage (over a daemon approach),
as it will be useless to anything except the apps that understand mail.

I do have one slightly radical suggestion though, that might make
a FS more generally useful.  Make each message its own *folder*!
The main text and any attachments would then become files in that
folder, with appropriate mime-type.  Perhaps the header itself
could actually be an attribute of the folder.  The 'files' in the
folder would of course be empty until a read was requested of that
particular one.  Base64 decoding or whatever would also be done
at that point, so if the attachment is a jpeg, you would get a
displayable image.

What d'you think?

        -- Pete --

Other related posts: