mirror of
https://github.com/al0cam/AutoMover.git
synced 2026-07-22 05:41:25 +00:00
simplified MovingRule to only have public attributes
This commit is contained in:
parent
bc398e0257
commit
4abc23113c
1 changed files with 4 additions and 19 deletions
|
|
@ -5,30 +5,15 @@ export class MovingRule {
|
|||
* TODO: Maybe it should be turned into a RegExp object
|
||||
* will try with string for now
|
||||
*/
|
||||
private _regex: string;
|
||||
public regex: string;
|
||||
/**
|
||||
* This field is used for defining the folder to which the files will be moved
|
||||
* It can use the previously defined groups to create folders with the same name
|
||||
*/
|
||||
private _folder: string;
|
||||
public folder: string;
|
||||
|
||||
constructor(regex?: string, folder?: string) {
|
||||
this._regex = regex || '';
|
||||
this._folder = folder || '';
|
||||
}
|
||||
public get regex(): string {
|
||||
return this._regex;
|
||||
}
|
||||
|
||||
public set regex(value: string) {
|
||||
this._regex = value;
|
||||
}
|
||||
|
||||
public get folder(): string {
|
||||
return this._folder;
|
||||
}
|
||||
|
||||
public set folder(value: string) {
|
||||
this._folder = value;
|
||||
this.regex = regex || '';
|
||||
this.folder = folder || '';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue