1.0.1 • Published 4 years ago

fireshield v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

FireShield

Utilizalo para limitar el acceso a archivos y folders

Functions(english)

  • fireshield.shieldWithFire(parameter);
    • Function: Adds a path to the shieldMe list
    • parameter: a string or array of strings containing a path/filename
  • fireshield.pass(parameter);
    • Function: Verifies if the program should allow to access a certain file/folder
    • parameter: a string containing the path or filename of the item to be access checked
    • returns true if the access to the file/folder should be allowed
    • returns false if the access to the file/folder should be denied
  • fireshield.water(parameter);
    • Function: Removes protection from the specifies protected item
    • parameter: a string containing the path or filename of the item to be removed from the list(the exact same one used to create it)
  • fireshield.hose();
    • Function: Removes all items from the shieldMe list (all protections are deleted)
    • parameter: takes no parameters

Ejemplo 1(español)

const fireshield=require("fireshield");
//Proteger archivos y folders supliendo el path en forma de string o array de strings
fireshield.shieldWithFire("/supersecreto.txt");
fireshield.shieldWithFire(["/basededatos","/topSecret"]);

//pass devuelve true si debes permitir el acceso y false si lo debes prohibir
//este toma como parámetro un path en de tipo string
console.log(fireshield.pass("/basededatos"));//returns false
console.log(fireshield.pass("/topSecret"));//returns false

//Para remover la protección de uno o varios files/folders suplir como parámetro un string o array de string

fireshield.water("/supersecreto.txt");
//o un array
fireshield.water(["/basededatos","/topSecret"]);

//Si verificas, ahora puedes accesar
console.log(fireshield.pass("/basededatos"));//returns true
console.log(fireshield.pass("/topSecret"));//returns true

//Remueve todos los elementos protegidos
fireshield.hose();

Hecho en 🇵🇷Puerto Rico por Radamés J. Valentín Reyes