+/*!
+ * Open data-, metadata(header)- or ressource fork
+ *
+ * You must call ad_init() before ad_open, usually you'll just call it like this: \n
+ * @code
+ * struct adoube ad;
+ * ad_init(&ad, vol->v_adouble, vol->v_ad_options);
+ * @endcode
+ *
+ * @param path Path to file or directory
+ *
+ * @param adflags ADFLAGS_DF: open data file/fork\n
+ * ADFLAGS_HF: open header (metadata) file\n
+ * ADFLAGS_RF: open ressource fork *** FIXME: not used ?! *** \n
+ * ADFLAGS_CREATE: indicate creation\n
+ * ADFLAGS_NOHF: it's not an error if header file couldn't be created\n
+ * ADFLAGS_DIR: if path is a directory you MUST or ADFLAGS_DIR to adflags\n
+ * ADFLAGS_NOADOUBLE: dont create adouble files if not necessary\n
+ * ADFLAGS_RDONLY: open read only\n
+ * ADFLAGS_OPENFORKS: check for open forks from other processes\n
+ * ADFLAGS_MD: alias for ADFLAGS_HF\n
+ * ADFLAGS_V1COMPAT: obsolete
+ *
+ * @param oflags flags passed through to open syscall: \n
+ * O_RDONLY: *** FIXME *** \n
+ * O_RDWR: *** FIXME *** \n
+ * O_CREAT: create fork\n
+ * O_EXCL: fail if exists with O_CREAT
+ *
+ * @param mode passed to open with O_CREAT
+ *
+ * @param ad pointer to struct adouble
+ *
+ * @returns 0 on success
+ *
+ * @note It's not possible to open the header file O_RDONLY -- the read
+ * will fail and return an error. this refcounts things now.\n
+ * metadata(ressource)-fork only gets created with O_CREAT.