Giter VIP home page Giter VIP logo

pathos's Introduction

pathos

Documentation Actions Status

noun From Ancient Greek πάθος (páthos, “suffering”). The quality or property of anything which touches the feelings or excites emotions and passions, especially that which awakens tender emotions, such as pity, sorrow, and the like; contagious warmth of feeling, action, or expression; pathetic quality.

A natural API for finding OS-specific user or system directories, regardless of the operating system.

pathos specifically supports iOS and Android's idiosyncratic handling of 'user' directories.

Features

URL path handling

pathos supports Unicode-safe URL paths for file:, and a special custom container: scheme on iOS and Android. pathos can convert between ordinary Path types and these Iri types with ease, simplifying saving paths in a configuration system without worrying about OsString problems.

Platform-agnostic modules

Don't care what platform you're building for and just want a project directory in the right place? pathos::system and pathos::user re-export the host platform's submodule.

Platform-specific handling

Sometimes you have to care what platform you're on for special-cased weirdness. In those cases, the appropriate APIs are available on the relevant OS submodule.

Full XDG support

XDG is the default mechanism for handling user directories on Linux, and can be opted into on other platforms by using the pathos::xdg module.

Usage

Add the following to your Cargo.toml:

pathos = "0.2"

Where is this used?

  • box - a modern replacement for the zip file format
  • pahkat - a cross-platform package management system

License

Licensed under either of

at your option.

pathos's People

Contributors

bbqsrc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

icodein

pathos's Issues

Consider a hierarchy of path types

  • Distinguish absolute and relative path with specific types
  • Create a Utf8Path type for handling the majority case of paths being representable as &str
  • Create PosixPath and WindowsPath path types for handling paths on different OSes agnosticly
  • Integrate path resolution without relying on canonicalisation

Documentation

I am notoriously bad at documenting my crates. Any help would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.