/*
** The single property that we define (in the DAV_FS_URI_MYPROPS namespace)
+** XXX this property is not usable (readable/writable) on all platforms
+** Need an abstract way to determine this.
*/
+#ifdef UNIX
#define DAV_PROPID_FS_executable 1
+#endif
static const dav_liveprop_spec dav_fs_props[] =
{
DAV_PROPID_getlastmodified,
0
},
-
+#ifdef DAV_PROPID_FS_executable
{
DAV_FS_URI_MYPROPS,
"executable",
DAV_PROPID_FS_executable,
0 /* handled special in dav_fs_is_writable */
},
-
+#endif
{ 0 } /* sentinel */
};
buf);
value = buf;
break;
-
+#ifdef DAV_PROPID_FS_executable
case DAV_PROPID_FS_executable:
/* our property, but not defined on collection resources */
if (resource->collection)
else
value = "F";
break;
-
+#endif
default:
/* ### what the heck was this property? */
return DAV_PROP_INSERT_NOTDEF;
return what;
}
+#ifdef DAV_PROPID_FS_executable
+
static int dav_fs_is_writable(const dav_resource *resource, int propid)
{
const dav_liveprop_spec *info;
- /* XXX this property is not usable (writable) on all platforms
- * Need an abstract way to determine this.
- */
if (propid == DAV_PROPID_FS_executable && !resource->collection)
return 1;
return NULL;
}
-
static const dav_hooks_liveprop dav_hooks_liveprop_fs =
{
dav_fs_insert_prop,
dav_fs_patch_rollback
};
+#endif /* DAV_PROPID_FS_executable */
+
static const dav_provider dav_fs_provider =
{
&dav_hooks_repository_fs,
void dav_fs_gather_propsets(apr_array_header_t *uris)
{
- /* XXX: Need an abstract way to determine this on a per-filesystem basis
- * This may change by uri (!) (think OSX HFS + unix mounts).
- */
+#ifdef DAV_PROPID_FS_executable
*(const char **)apr_array_push(uris) =
"<http://apache.org/dav/propset/fs/1>";
+#endif
}
int dav_fs_find_liveprop(const dav_resource *resource,
what, phdr);
(void) dav_fs_insert_prop(resource, DAV_PROPID_getetag,
what, phdr);
+#ifdef DAV_PROPID_FS_executable
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_executable,
what, phdr);
+#endif
/* ### we know the others aren't defined as liveprops */
}