Function chmod

  • Asynchronously changes the permissions of a file. No arguments other than a possible exception are given to the completion callback.

    See the POSIX chmod(2) documentation for more detail.

    import { chmod } from 'fs';

    chmod('my_file.txt', 0o775, (err) => {
    if (err) throw err;
    console.log('The permissions for file "my_file.txt" have been changed!');
    });

    Since

    v0.0.67

    Parameters

    Returns void

  • Asynchronously changes the permissions of a file. No arguments other than a possible exception are given to the completion callback.

    See the POSIX chmod(2) documentation for more detail.

    import { chmod } from 'fs';

    chmod('my_file.txt', 0o775, (err) => {
    if (err) throw err;
    console.log('The permissions for file "my_file.txt" have been changed!');
    });

    Since

    v0.0.67

    Parameters

    Returns void

Generated using TypeDoc