1.0.8 • Published 3 years ago

walker v1.0.8

Weekly downloads
9,942,237
License
Apache-2.0
Repository
github
Last release
3 years ago

walker Build Status

A nodejs directory walker. Broadcasts events for various file types as well as a generic "entry" event for all types and provides the ability to prune directory trees. This shows the entire API; everything is optional:

Walker('/etc/')
  .filterDir(function(dir, stat) {
    if (dir === '/etc/pam.d') {
      console.warn('Skipping /etc/pam.d and children')
      return false
    }
    return true
  })
  .on('entry', function(entry, stat) {
    console.log('Got entry: ' + entry)
  })
  .on('dir', function(dir, stat) {
    console.log('Got directory: ' + dir)
  })
  .on('file', function(file, stat) {
    console.log('Got file: ' + file)
  })
  .on('symlink', function(symlink, stat) {
    console.log('Got symlink: ' + symlink)
  })
  .on('blockDevice', function(blockDevice, stat) {
    console.log('Got blockDevice: ' + blockDevice)
  })
  .on('fifo', function(fifo, stat) {
    console.log('Got fifo: ' + fifo)
  })
  .on('socket', function(socket, stat) {
    console.log('Got socket: ' + socket)
  })
  .on('characterDevice', function(characterDevice, stat) {
    console.log('Got characterDevice: ' + characterDevice)
  })
  .on('error', function(er, entry, stat) {
    console.log('Got error ' + er + ' on entry ' + entry)
  })
  .on('end', function() {
    console.log('All files traversed.')
  })

You specify a root directory to walk and optionally specify a function to prune sub-directory trees via the filterDir function. The Walker exposes a number of events, broadcasting various file type events a generic error event and finally the event to signal the end of the process.

jest-haste-mapsane@-kain/deployarchetype-libraryeasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsspecify-importsbabel-specify-imports@icanpm/api-masterreact-native-template-rfbaseairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modbitgetreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@olivervorasai/sliderreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testwilscanner@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testreact-native-slider-kf@saaspe/componentsplginexpand-react-bridgeluminos-ui-coresklif-ui-kitsklif-apijawwy-sdkjawwy_gamification_release@everything-registry/sub-chunk-3110@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uireact-native-jawwy_sample@neuraiproject/chains@ndjoe/react-native-bluetooth-escpos-printer@navabi/react-native-ssl-pinning@neo-component/reactsane-updatesrn-adyen-dropinrn-agora-ios-mrn-counter-demojrennsoh88-react-native-scroll-indicatordate-library-aarn-circular-chartrn-check-btndate_operations_manipulatordate-to-block-ethjulien-easy-modalrouter-loggerkhaled-salem-custom-componentsjxLoaderdetect-invalid-requiresrtr-rosnodejsdot-clipboarddogandev-simple-toastrosnodejssails-hook-hbsdesign-system-fitbank-450resource-storeresponsive-react-app@con-test/react-native-concent-commoncolor-scheme-detectorreact-native-ghn-ekycreact-native-get-countriesreact-native-hlf-wrapperreact-native-firebase-messagingreact-native-handcheque-enginereact-native-expo-read-sms-ts-kfreact-native-fedlight-dsmreact-native-flyyignisreact-native-version-managerreact-router-v5-v6-bridged-featuresreact-native-tejab41097-sample-libraryreact-native-teknoctrl-componentsreact-native-teads-sdk-modulereact-native-swalreact-native-test-viewreact-native-test-comlibraryreact-native-testwebreact-native-test-module-hhh@cs6/react-native-test-native-view-library@deep27/supersetpluginchart-helloworld
1.0.8

3 years ago

1.0.7

9 years ago

1.0.6

10 years ago

1.0.5

11 years ago

1.0.3

13 years ago

1.0.2

13 years ago

1.0.1

13 years ago

1.0.0

13 years ago

0.0.4

13 years ago

0.0.3

13 years ago

0.0.1

13 years ago