Code Monkey home page Code Monkey logo

scala-pathy's Introduction

Build Status

pathy

A type-safe abstraction for platform-independent file system paths.

Ported from purescript-pathy.

Example

val fullPath = rootDir </> dir("baz") </> file("foo.png")

See the examples file for more.

Getting Started

Installation

pathy is cross-built against Scala 2.10.x and 2.11.x.

If you're using SBT, add the following to your build file

libraryDependencies += "com.slamdata" %% "pathy" % "0.0.1-SNAPSHOT"

Usage

The following imports will bring all types and operations into scope

import pathy._, Path._

scala-pathy's People

Contributors

alissapajer avatar cryogenian avatar dcsobral avatar djspiewak avatar drostron avatar encodepanda avatar jdegoes avatar jedesah avatar mossprescott avatar nicflores avatar paulp avatar precog-bot avatar rintcius avatar sellout avatar wemrysi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-pathy's Issues

windowsCodec does not parse windows paths

Example reproducer: C:\foo\bar This will not parse as an absolute path. Basically, PathCodec hard-assumes POSIX-style paths, despite being nominally parametric in its path semantics.

Path for URI

I want to use pathy for the path part in the URI.
currently I only have access to

def currentDir[S]: Path[Rel, Dir, S] = Current
def rootDir[S]: Path[Abs, Dir, S] = Root

something like:

def current[T, S]: Path[Rel, T, S] = Current
def root[T, S]: Path[Abs, T, S] = Root

would be useful.

Parser ignores "."

PathCodec's parse methods ignore directories called ., which is really a posix-specific feature and doesn't make sense for other codecs.

Much worse, parsing a file called . will actually produce a path with a non-sensical type:

@ posixCodec.parseAbsFile("/foo/bar/.").map(posixCodec.unsafePrintPath)
res1: Option[String] = Some(/foo/bar/)

Automate release process

Should be able to release directly from a CI build once it has been deemed worthy of release.

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.