comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: ZFS/BtrFS bindings
Date: Mon, 15 Jul 2013 19:31:01 -0500
Date: 2013-07-15T19:31:01-05:00	[thread overview]
Message-ID: <ks2485$ks0$1@loke.gir.dk> (raw)
In-Reply-To: 3b1b00b6-9799-4827-b51c-8e08d4dc6e91@googlegroups.com

"Dufr" <dufriz@gmail.com> wrote in message 
news:3b1b00b6-9799-4827-b51c-8e08d4dc6e91@googlegroups.com...
>> There aren't any bindings, for any filesystem, for any language. Your
>> application opens a file, reads from/writes to it, closes it when ready.
>> That's all. What type of filesystem you're file is located on doesn't 
>> (and
>> shouldn't) matter.
>
>Sorry, but it is not as simple as that!
>When we are talking about sophisticated file systems, such as ZFS, bindings
>are necessary, because the functions which are specific to the file system 
>are
>not supported by the language. Of course, I am talking about functions that
>are beyond opening, reading and writing files.
>For instance: extended attributes (xattr). Can I access and use them from 
>Ada?
>No, unless I have the bindings specific to that file system.

Such things are supposed to be made available as children of Ada.Directories 
in Ada.Directories.Information and the like. Of course, those packages are 
implementation-defined, and whether a particular compiler has access to 
anything in particular is up to that vendor. I think most vendors make 
OS-specific stuff available, but not necessarily anything below that.

I'd be dubious about depending on any particular file system, since that 
would prevent your program from working in any other environment in the 
future (and one thing we certainly know, whatever is being used this year 
will be replaced by something better in a few years).

Any I'm extremely dubious that a third-party "binding" would work. You could 
get some file attributes that way, but you wouldn't be able to use any of 
that information for I/O (that is, you couldn't open a file identified by 
the binding) because there is no Ada way to do such low-level access to I/O 
facilities. I think you'd have to get it from your Ada compiler vendor for 
it to be very useful.

                                   Randy.






  reply	other threads:[~2013-07-16  0:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-14  2:48 ZFS/BtrFS bindings Dufr
2013-07-14  9:47 ` Dirk Heinrichs
2013-07-14  9:59   ` Dufr
2013-07-16  0:31     ` Randy Brukardt [this message]
2013-07-16  2:55       ` Dufr
2013-07-16  4:25         ` Jeffrey Carter
2013-07-16 22:18           ` Randy Brukardt
2013-07-18 12:47             ` Dufr
2013-07-19  4:56               ` Randy Brukardt
2013-07-16 20:29     ` Dirk Heinrichs
2013-07-22 19:20       ` Per Sandberg
2013-07-22 19:51       ` Per Sandberg
2013-08-04  6:46         ` Dirk Heinrichs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox