擅长:python、mysql、java
<p>这里有一种方法可以实现:</p>
<pre><code>import os
import time
# Path to the file/directory
path = "/dbfs/mnt/schema_id=na"
for file_item in os.listdir(path):
file_path = os.path.join(path, file_item)
ti_c = os.path.getctime(file_path)
ti_m = os.path.getmtime(file_path)
c_ti = time.ctime(ti_c)
m_ti = time.ctime(ti_m)
print(f"The file {file_item} located at the path {path} was created at {c_ti} and was last modified at {m_ti}")
</code></pre>