Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shell(command)
  2.     .err(func)            // Redirects stderr data to the given function.
  3.     .exec()               // (eval) Executes this shell command.
  4.     .expect(exitcode)     // Sets the expected exitcode for this command. Default is 0.
  5.     .log(func)            // Redirects both stdout and stderr to the given function.
  6.     .out(func)            // Redirects stdout data to the given function.
  7.  
  8. watch(path)
  9.     .timeout(ms)          // Sets a this watchers debounce timeout (default is 250ms)
  10.     .run(func)            // Runs this function when a file or folder changes.
  11.     .exec()               // Executes this watch (does not complete)
  12.  
  13. folder(path)
  14.     .add(path)            // Adds a file to this folder. If the path being added exists, it is overwritten.
  15.     .copy_to(folder)      // Copies this folder into the given folder.
  16.     .contents()           // Returns the inner contents of this folder (see contents)
  17.         .copy_to(folder)  // Copies the contents into the given folder.
  18.         .move_to(folder)  // Moves the contents into the given folder.
  19.         .delete()         // Deletes the contents of this folder.
  20.         .exec()           // Executes effects on these contents.
  21.     .create()             // Creates this folder if not exists.
  22.     .delete()             // Deletes this folder if exists.
  23.     .exec()               // (eval) Executes effects on this folder.
  24.     .exists()             // (eval) Returns true if this folder exists.
  25.     .hash(algo?)          // (eval) Returns a hash of this folder with the given algorithm.
  26.     .merge_from(folder)   // Merges the contents from the remote folder into this folder.
  27.     .move_to(folder)      // Moves this folder into the given folder.
  28.     .remove(name)         // Removes a file or folder from this folder.
  29.     .rename(newname)      // Renames this folder.
  30.     .size()               // (eval) Returns the size of this folder in bytes.
  31.     .stat()               // (eval) Returns a fs stats object for this folder.
  32.  
  33. file(path)
  34.     .append_from(path)    // Appends to this file from a remote path | url. If file not exist, create.
  35.     .append(data)         // Appends to this file. If file not exist, create.
  36.     .copy_to(folder)      // Copies this file into the given folder.
  37.     .create()             // Creates this if not exists.
  38.     .delete()             // Deletes this file if exists.
  39.     .edit(find, replace)  // Makes a find and replace edit to this file.
  40.     .exec()               // (eval) Executes effects on this file.
  41.     .exists()             // (eval) Returns if this file exists.
  42.     .hash(algo?)          // (eval) Returns a hash for this file with the given algorithm.
  43.     .move_to(folder)      // Moves this file into the given folder.
  44.     .prepend_from(path)   // Prepends to this file from a remote path | url. If file not exist, create.
  45.     .prepend(data)        // Prepends to this file. If file not exist, create.
  46.     .read(encoding?)      // (eval) Returns the contents of this file.
  47.     .rename(newname)      // Renames this file.
  48.     .size()               // (eval) Returns the size of this file in bytes.
  49.     .stat()               // (eval) Returns a fs stats object for this file.
  50.     .truncate()           // Truncates this file. If the file does not exist, it is created.
  51.     .write_from(path)     // Writes to this file from a remote path | url. If file not exist, create.
  52.     .write(data)          // Writes to this file. If the file does not exist, it is created.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement