All Projects → dixonwille → skywalker

dixonwille / skywalker

Licence: BSD-3-Clause license
A package to allow one to concurrently go through a filesystem with ease

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to skywalker

gtree
Output tree🌳 or Make directories📁 from #Markdown or Programmatically. Provide CLI, Golang library and Web (using #Wasm ).
Stars: ✭ 88 (+1.15%)
Mutual labels:  filesystem, awesome-go
Python Atomicwrites
Powerful Python library for atomic file writes.
Stars: ✭ 253 (+190.8%)
Mutual labels:  filesystem, concurrency
archery
Abstract over the atomicity of reference-counting pointers in rust
Stars: ✭ 107 (+22.99%)
Mutual labels:  concurrency
YACLib
Yet Another Concurrency Library
Stars: ✭ 193 (+121.84%)
Mutual labels:  concurrency
paragon apfs sdk ce
Paragon APFS SDK Free
Stars: ✭ 97 (+11.49%)
Mutual labels:  filesystem
gravity
User-space deniable data encryption client.
Stars: ✭ 89 (+2.3%)
Mutual labels:  filesystem
nvfuse
NVMe based File System in User-space
Stars: ✭ 81 (-6.9%)
Mutual labels:  filesystem
p-ratelimit
Promise-based utility to make sure you don’t call rate-limited APIs too quickly.
Stars: ✭ 49 (-43.68%)
Mutual labels:  concurrency
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (-81.61%)
Mutual labels:  concurrency
batching-toposort
Efficiently sort interdependent tasks into a sequence of concurrently-executable batches
Stars: ✭ 21 (-75.86%)
Mutual labels:  concurrency
linked-blocking-multi-queue
A concurrent collection that extends the existing Java concurrent collection library, offering an optionally-bounded blocking "multi-queue" based on linked nodes.
Stars: ✭ 41 (-52.87%)
Mutual labels:  concurrency
nested scheduler
Shard for creating separate groups of fibers in a hierarchical way and to collect results and errors in a structured way.
Stars: ✭ 20 (-77.01%)
Mutual labels:  concurrency
ksmbd
ksmbd kernel server(SMB/CIFS server)
Stars: ✭ 181 (+108.05%)
Mutual labels:  filesystem
glob
Pure Nim library for matching file paths against Unix style glob patterns.
Stars: ✭ 58 (-33.33%)
Mutual labels:  filesystem
RxLogs
An Android & Kotlin Reactive Advanced Logging Framework.
Stars: ✭ 12 (-86.21%)
Mutual labels:  filesystem
django-concurrency-talk
🎭 Database Integrity in Django: Safely Handling Critical Data in Distributed Systems
Stars: ✭ 49 (-43.68%)
Mutual labels:  concurrency
haskell-simple-concurrency
Small examples of concurrency in Haskell.
Stars: ✭ 75 (-13.79%)
Mutual labels:  concurrency
lustre-release
Mirror of official Lustre development repository http://git.whamcloud.com/
Stars: ✭ 35 (-59.77%)
Mutual labels:  filesystem
kodbox
kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
Stars: ✭ 1,188 (+1265.52%)
Mutual labels:  filesystem
crunchdb
A simple JSON based database system written in PHP. Useful for smaller applications.
Stars: ✭ 32 (-63.22%)
Mutual labels:  filesystem

skywalker GoDoc Build Status Build status codecov Go Report Card

Skywalker is a package to allow one to concurrently go through a filesystem with ease.

Features

  • Concurrency
  • BlackList filtering
  • WhiteList filtering
  • Filter by Directory
  • Filter by Extension
  • Glob Filtering (provided by gobwas/glob)

For matching to work properly across platforms. Please use /. In gobwas/glob the \ is an escape character (so you can escape *, ?, etc...) making it difficult to know if you want to escape a character or go into directory.

Example

package main

import (
    "fmt"
    "sort"
    "strings"
    "sync"

    "github.com/dixonwille/skywalker"
)

type ExampleWorker struct {
    *sync.Mutex
    found []string
}

func (ew *ExampleWorker) Work(path string) {
    //This is where the necessary work should be done.
    //This will get concurrently so make sure it is thread safe if you need info across threads.
    ew.Lock()
    defer ew.Unlock()
    ew.found = append(ew.found, path)
}

func main() {
    //Following two functions are only to create and destroy data for the example
    defer teardownData()
    standupData()

    ew := new(ExampleWorker)
    ew.Mutex = new(sync.Mutex)

    //root is the root directory of the data that was stood up above
    sw := skywalker.New(root, ew)
    sw.DirListType = skywalker.LTBlacklist
    sw.DirList = []string{"sub"}
    sw.ExtListType = skywalker.LTWhitelist
    sw.ExtList = []string{".pdf"}
    err := sw.Walk()
    if err != nil {
        fmt.Println(err)
        return
    }
    sort.Sort(sort.StringSlice(ew.found))
    for _, f := range ew.found {
        fmt.Println(strings.Replace(f, sw.Root, "", 1))
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].