from pathlib import Path, PosixPath
print(Path.cwd())
print(Path.home())
p = Path('0.py')
print(p.stat())
print(p.stat().st_mode)
print(p.chmod(p.stat().st_mode))
#print(Path.chmod(p.stat().st_mode))
#print(Path.chmod(oct(p.stat().st_mode)))
print(Path('.').exists())
p = PosixPath('~/films/Monty Python')
print(p.expanduser())
print(sorted(Path('.').glob('*.py')))
print(sorted(Path('.').glob('*/*.py')))
print(sorted(Path('.').glob('**/*.py')))

p = Path('0.py')
print(p.group())
print(p.is_dir())
print(p.is_file())
print(p.is_symlink())
print(p.is_socket())
print(p.is_fifo())
print(p.is_block_device())
print(p.is_char_device())
print(p.iterdir())
#print(p.lchmod())
print(p.lstat())
print(Path('dir').mkdir(mode=0o777, parents=True, exist_ok=True))
print(p.open())
print(p.owner())
print(p.read_bytes())
print(p.read_text())
#print(p.rename(Path('dir')))
#print(p.replace(Path('dir')))
print(p.resolve())

