Sha256: 951f51f14e9b007690921277eef20cd26930e9810c4870b76f2d1dc8b3a59286

Contents?: true

Size: 908 Bytes

Versions: 4

Compression:

Stored size: 908 Bytes

Contents

# fspath

Better than Pathname

Check out fspath-mac and fspath-xattr.

## Synopsis

User dir:

    FSPath.~

Other user dir:

    FSPath.~('other')

Common dir for paths:

    FSPath.common_dir('/a/b/c/d/e/f', '/a/b/c/1/hello', '/a/b/c/2/world') # => FSPath('/a/b/c')

Join paths:

    FSPath('a') / 'b' / 'c' # => FSPath('a/b/c')

Write data:

    FSPath('a').write('data')

Append data:

    FSPath('a').append('data')

Escape glob:

    FSPath('trash?/stuff [a,b,c]').escape_glob # => FSPath('trash\?/stuff \[a,b,c\]')

Expand glob:

    FSPath('trash').glob('**', '*')

Ascendants:

    FSPath('a/b/c').ascend # => [FSPath('a/b/c'), FSPath('a/b'), FSPath('a')]

Descendants:

    FSPath('a/b/c').descend # => [FSPath('a'), FSPath('a/b'), FSPath('a/b/c')]

Path parts:

    FSPath('/a/b/c').parts # => ['/', 'a', 'b', 'c']

## Copyright

Copyright (c) 2010-2011 Ivan Kuchin. See LICENSE.txt for details.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fspath-2.0.3 README.markdown
fspath-2.0.2 README.markdown
fspath-2.0.1 README.markdown
fspath-2.0.0 README.markdown