File: dir_item_name_hash.py

package info (click to toggle)
python-btrfs 15-1
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 620 kB
  • sloc: python: 4,772; makefile: 195
file content (11 lines) | stat: -rwxr-xr-x 197 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python3

import btrfs
import sys

if len(sys.argv) < 2:
    print("Usage: {} <text>".format(sys.argv[0]))
    sys.exit(1)

filename = sys.argv[1]
print(btrfs.crc32c.name_hash(filename))