Roland

The path of mac is really a mess

2026-09-02

Today I want to write a tool using python.

from os import listdir

import os

from os.path import isfile, join

book_path='/Users/rolandsu/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/'

filename_list = listdir(book_path)

print(filename_list)

Like this, and I found that it’s really hard to find a correct path for mac, their path convention is really weird.

← Back