파일과 디렉터리 액세스¶
이 장에서 설명하는 모듈은 디스크 파일과 디렉터리를 다룹니다. 예를 들어, 파일의 속성을 읽고, 이식성 있는 방식으로 경로를 조작하고, 임시 파일을 만드는 모듈이 있습니다. 이 장의 전체 모듈 목록은 다음과 같습니다:
pathlib— Object-oriented filesystem pathsos.path— Common pathname manipulationsfileinput— Iterate over lines from multiple input streamsstat— Interpretingstat()resultsfilecmp— File and Directory Comparisonstempfile— Generate temporary files and directoriesglob— Unix style pathname pattern expansionfnmatch— Unix filename pattern matchinglinecache— Random access to text linesshutil— High-level file operations