Skip to content

Commit

Permalink
Adding inline documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Drew committed Feb 12, 2025
1 parent bf9decf commit c5f850e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/src/main/cfml/cfrules/CFRules.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ component accessors="true" {
return ret;
}

/**
* extension_not_allowed checks for file extensions defined in the `value` key of the rule an makes sure that it is not present in the directory defied in the `path` key
*
* @rule
*/
array function extension_not_allowed(struct rule) {
var foundItems = [];
var path = getRootPath() & (rule.path ?: '');
Expand Down Expand Up @@ -99,7 +104,11 @@ component accessors="true" {
return foundItems;
}

array function folder_not_allowed(struct rule) {
/**
* folder_not_allowed checks for folders defined in the `value` key of the rule an makes sure that it is not present in the directory defied in the `path` key
*
* @rule
*/array function folder_not_allowed(struct rule) {
var foundItems = [];
var path = getRootPath() & (rule.path ?: '');
if (!directoryExists(path)) {
Expand Down

0 comments on commit c5f850e

Please sign in to comment.