Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

FileStatus: 파일 메타데이터

transforms.api.FileStatus는 FoundryFS 파일의 세부 정보를 담는 collections.namedtuple입니다.

transforms.api.FileStatus(path, size, modified)
필드튜플 위치의미
path0파일의 논리 경로
size1파일 크기
modified2수정 시각

FileSystem.ls의 계약에서 size는 바이트이고 modified는 UTC 1970년 1월 1일부터의 밀리초입니다. 속성 접근과 튜플 위치 접근은 같은 필드를 가리킵니다.

튜플 메서드

count(value, /)
index(value, start=0, stop=9223372036854775807, /)

count는 이 튜플 안에서 값이 나타나는 횟수를 반환합니다. 파일시스템의 파일 개수를 세는 메서드가 아닙니다. index는 지정한 범위에서 값이 처음 나타나는 위치를 반환하고 값이 없으면 ValueError를 발생시킵니다. 슬래시 앞의 인자는 위치 인자로 전달합니다.

경량 FoundryDataSidecarFileSystem.ls도 FileStatus를 반환합니다. 실제 바이트를 읽고 쓰는 FoundryDataSidecarFile 객체와 메타데이터 튜플을 구분합니다.