Lines Matching refs:path
85 const pathModule = require('path');
553 async function access(path, mode = F_OK) {
554 path = getValidatedPath(path);
557 return binding.access(pathModule.toNamespacedPath(path), mode,
580 async function open(path, flags, mode) {
581 path = getValidatedPath(path);
585 await binding.openFileHandle(pathModule.toNamespacedPath(path),
710 async function truncate(path, len = 0) {
711 const fd = await open(path, 'r+');
721 async function rm(path, options) {
722 path = pathModule.toNamespacedPath(getValidatedPath(path));
723 options = await validateRmOptionsPromise(path, options, false);
724 return rimrafPromises(path, options);
727 async function rmdir(path, options) {
728 path = pathModule.toNamespacedPath(getValidatedPath(path));
733 const stats = await stat(path);
735 return rimrafPromises(path, options);
739 return binding.rmdir(path, kUsePromises);
750 async function mkdir(path, options) {
758 path = getValidatedPath(path);
761 return binding.mkdir(pathModule.toNamespacedPath(path),
784 const { 0: path, 1: readdir } = ArrayPrototypePop(queue);
785 for (const dirent of getDirents(path, readdir)) {
788 const direntPath = pathModule.join(path, dirent.name);
803 const { 0: path, 1: readdir } = ArrayPrototypePop(queue);
805 const direntPath = pathModule.join(path, ent);
829 async function readdir(path, options) {
831 path = getValidatedPath(path);
833 return readdirRecursive(path, options);
836 pathModule.toNamespacedPath(path),
842 getDirectoryEntriesPromise(path, result) :
846 async function readlink(path, options) {
848 path = getValidatedPath(path, 'oldPath');
849 return binding.readlink(pathModule.toNamespacedPath(path),
853 async function symlink(target, path, type_) {
856 path = getValidatedPath(path);
857 return binding.symlink(preprocessSymlinkDestination(target, type, path),
858 pathModule.toNamespacedPath(path),
868 async function lstat(path, options = { bigint: false }) {
869 path = getValidatedPath(path);
870 const result = await binding.lstat(pathModule.toNamespacedPath(path),
875 async function stat(path, options = { bigint: false }) {
876 path = getValidatedPath(path);
877 const result = await binding.stat(pathModule.toNamespacedPath(path),
882 async function statfs(path, options = { bigint: false }) {
883 path = getValidatedPath(path);
884 const result = await binding.statfs(pathModule.toNamespacedPath(path),
897 async function unlink(path) {
898 path = getValidatedPath(path);
899 return binding.unlink(pathModule.toNamespacedPath(path), kUsePromises);
907 async function chmod(path, mode) {
908 path = getValidatedPath(path);
910 return binding.chmod(pathModule.toNamespacedPath(path), mode, kUsePromises);
913 async function lchmod(path, mode) {
917 const fd = await open(path, O_WRONLY | O_SYMLINK);
921 async function lchown(path, uid, gid) {
922 path = getValidatedPath(path);
925 return binding.lchown(pathModule.toNamespacedPath(path),
935 async function chown(path, uid, gid) {
936 path = getValidatedPath(path);
939 return binding.chown(pathModule.toNamespacedPath(path),
943 async function utimes(path, atime, mtime) {
944 path = getValidatedPath(path);
945 return binding.utimes(pathModule.toNamespacedPath(path),
957 async function lutimes(path, atime, mtime) {
958 path = getValidatedPath(path);
959 return binding.lutimes(pathModule.toNamespacedPath(path),
965 async function realpath(path, options) {
967 path = getValidatedPath(path);
968 return binding.realpath(path, options.encoding, kUsePromises);
977 let path;
979 path = `${prefix}XXXXXX`;
981 path = Buffer.concat([prefix, Buffer.from('XXXXXX')]);
984 return binding.mkdtemp(path, options.encoding, kUsePromises);
987 async function writeFile(path, data, options) {
997 if (path instanceof FileHandle)
998 return writeFileHandle(path, data, options.signal, options.encoding);
1002 const fd = await open(path, flag, options.mode);
1011 async function appendFile(path, data, options) {
1015 return writeFile(path, data, options);
1018 async function readFile(path, options) {
1022 if (path instanceof FileHandle)
1023 return readFileHandle(path, options);
1027 const fd = await open(path, flag, 0o666);