xattr

Python MacOS Loop Files Get File Info

Python MacOS Loop Files Get File Info Question: I am trying to loop through all mp3 files in my directory in MacOS Monterrey and for every iteration get the file’s more info attributes, like Title, Duration, Authors etc. I found a post saying use xattr, but when i create a variable with xattr it doesn’t …

Total answers: 1

Why must a 'user.' be prepended to the name when setting a file's xattr with os.setxattr()?

Why must a 'user.' be prepended to the name when setting a file's xattr with os.setxattr()? Question: I am saving data that I guess could be deemed metadata on a JSON serialized file: os.setxattr(‘/var/tmp/test.json’, ‘user.keyname’, b’value’) and I can get the bytes value back via: os.getxattr(‘/var/tmp/test.json’, ‘user.keyname’) The only way I can get this to …

Total answers: 1