File: __init__.py

package info (click to toggle)
python-unipath 0.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 252 kB
  • ctags: 237
  • sloc: python: 937; makefile: 21
file content (25 lines) | stat: -rw-r--r-- 921 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""unipath.py - A two-class approach to file/directory operations in Python.

Full usage, documentation, changelog, and history are at
http://sluggo.scrapping.cc/python/unipath/

(c) 2007 by Mike Orr (and others listed in "History" section of doc page).
Permission is granted to redistribute, modify, and include in commercial and
noncommercial products under the terms of the Python license (i.e., the "Python
Software Foundation License version 2" at 
http://www.python.org/download/releases/2.5/license/).
"""

from unipath.abstractpath import AbstractPath
from unipath.path import Path

FSPath = Path

#### FILTER FUNCTIONS (PUBLIC) ####
def DIRS(p):  return p.isdir()
def FILES(p):  return p.isfile()
def LINKS(p):  return p.islink()
def DIRS_NO_LINKS(p):  return p.isdir() and not p.islink()
def FILES_NO_LINKS(p):  return p.isfile() and not p.islink()
def DEAD_LINKS(p):  return p.islink() and not p.exists()