To use the fchownSync
function from the fs-extra
library in TypeScript, you can follow the below steps:
Install the fs-extra
library using the following command:
28 chars2 lines
Import the required function in your TypeScript file:
index.ts39 chars2 lines
Use the function in your code by providing the required parameters:
index.ts241 chars11 lines
Here, we are setting the ownership of the file descriptor 1
to user ID 1001
and group ID 1002
.
That's it! You can now use the fchownSync
function from the fs-extra
library in your TypeScript code.
gistlibby LogSnag