From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: ZFS/BtrFS bindings Date: Mon, 15 Jul 2013 19:31:01 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <46f7ac55-b920-4003-8cac-a9cbc24b29a2@googlegroups.com> <3b1b00b6-9799-4827-b51c-8e08d4dc6e91@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1373934662 21376 69.95.181.76 (16 Jul 2013 00:31:02 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 16 Jul 2013 00:31:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Original-Bytes: 3067 Xref: number.nntp.dca.giganews.com comp.lang.ada:182527 Date: 2013-07-15T19:31:01-05:00 List-Id: "Dufr" 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.