Plan 9 from Bell Labs’s /usr/web/sources/contrib/de0u/root/sys/src/cmd/divergefs/filedirrule.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



typedef struct FileDirRule FileDirRule;

typedef struct FileDirRuleOperations
{
  bool (*contains_file)(FileDirRule *rule, char *path);
  bool (*contains_dir)(FileDirRule *rule, char *path);
} FileDirRuleOperations;

struct FileDirRule
{
  Rule;
  FileDirRuleOperations *fdops;
};

bool filedirrule_contains(Rule *rule, char *path, int omode, ulong perm);

/** generic contains function that always return true */
bool filedirrule_contains_true(FileDirRule *, char *);

/** generic contains function that always return false */
bool filedirrule_contains_false(FileDirRule *, char *);

bool filedirrule_file_issatisfy(Rule *self, char *path, Dir *d);

bool filedirrule_dir_issatisfy(Rule *self, char *path, Dir *d);

bool filedirrule_file_dir_issatisfy(Rule *self, char *path, Dir *d);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].