표준 PHP 라이브러리(SPL) The DirectoryIterator class

(PHP 5, PHP 7, PHP 8)


소개

DirectoryIterator 클래스는 파일 시스템 디렉토리의 내용을 보기 위한 간단한 인터페이스를 제공합니다.


클래스 개요

                  
class DirectoryIterator extends SplFileInfo implements SeekableIterator {

  /* Methods */
  public __construct(string $directory)
  public current(): mixed
  public getATime(): int
  public getBasename(string $suffix = ""): string
  public getCTime(): int
  public getExtension(): string
  public getFilename(): string
  public getGroup(): int
  public getInode(): int
  public getMTime(): int
  public getOwner(): int
  public getPath(): string
  public getPathname(): string
  public getPerms(): int
  public getSize(): int
  public getType(): string
  public isDir(): bool
  public isDot(): bool
  public isExecutable(): bool
  public isFile(): bool
  public isLink(): bool
  public isReadable(): bool
  public isWritable(): bool
  public key(): mixed
  public next(): void
  public rewind(): void
  public seek(int $offset): void
  public __toString(): string
  public valid(): bool

  /* Inherited methods */
  public SplFileInfo::getATime(): int|false
  public SplFileInfo::getBasename(string $suffix = ""): string
  public SplFileInfo::getCTime(): int|false
  public SplFileInfo::getExtension(): string
  public SplFileInfo::getFileInfo(?string $class = null): SplFileInfo
  public SplFileInfo::getFilename(): string
  public SplFileInfo::getGroup(): int|false
  public SplFileInfo::getInode(): int|false
  public SplFileInfo::getLinkTarget(): string|false
  public SplFileInfo::getMTime(): int|false
  public SplFileInfo::getOwner(): int|false
  public SplFileInfo::getPath(): string
  public SplFileInfo::getPathInfo(?string $class = null): ?SplFileInfo
  public SplFileInfo::getPathname(): string
  public SplFileInfo::getPerms(): int|false
  public SplFileInfo::getRealPath(): string|false
  public SplFileInfo::getSize(): int|false
  public SplFileInfo::getType(): string|false
  public SplFileInfo::isDir(): bool
  public SplFileInfo::isExecutable(): bool
  public SplFileInfo::isFile(): bool
  public SplFileInfo::isLink(): bool
  public SplFileInfo::isReadable(): bool
  public SplFileInfo::isWritable(): bool
  public SplFileInfo::openFile(string $mode = "r", bool $useIncludePath = false, ?resource $context = null): SplFileObject
  public SplFileInfo::setFileClass(string $class = SplFileObject::class): void
  public SplFileInfo::setInfoClass(string $class = SplFileInfo::class): void
  public SplFileInfo::__toString(): string
}
                  
                

목차