You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The @std/fs/walk has an issue where if it encounters a directory that it does not have read permissions, it errors with a PermissionDenied: Permission denied (os error 13) Describe the solution you'd like
Add another option to the WalkOptions type to be able to specify a handler which can handle this error and rethrow it or ignore it, or, an option to be able to ignore this error and continue (the first would be preferred).
Describe alternatives you've considered
An alternative is to re-write this feature using a generator function which seems to work, but since this feature is already available in the standard library, it would be useful to add an option to ignore or handle directories and files that it does not have permission to read
Test script
import { walk } from "jsr:@std/fs/walk";
try {
for await (const dirEntry of walk("/etc/")) {
console.log("Recursive walking:", dirEntry.name);
}
} catch (err) {
console.error(err);
}
Produces in my Macbook PermissionDenied: Permission denied (os error 13): readdir '/etc/cups/certs'
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The
@std/fs/walk
has an issue where if it encounters a directory that it does not have read permissions, it errors with aPermissionDenied: Permission denied (os error 13)
Describe the solution you'd like
Add another option to the
WalkOptions
type to be able to specify a handler which can handle this error and rethrow it or ignore it, or, an option to be able to ignore this error and continue (the first would be preferred).Describe alternatives you've considered
An alternative is to re-write this feature using a generator function which seems to work, but since this feature is already available in the standard library, it would be useful to add an option to ignore or handle directories and files that it does not have permission to read
Test script
Produces in my Macbook
PermissionDenied: Permission denied (os error 13): readdir '/etc/cups/certs'
The text was updated successfully, but these errors were encountered: