Folder::time()

Gets the folder creation time.

Table of Contents
  1. Description
  2. Example

Description

Folder::time(?string $format = null): int|string;

This method returns the folder creation time in Unix time stamp format by default.

Example

$folder = new Folder('.\path\to\folder');

$time = $folder->time(); // Returns `1668304188`
$time = $folder->time('%Y-%m-%d %T'); // Returns `'2022-11-13 08:49:48'`

For Windows this method returns the creation time, and for Unix this method returns the change time. On Unix, there is no creation time (in most file systems).

Folder::size()

Gets the total sizes of files contained in the folder in human readable string format.

Folder::time()

Gets the folder creation time.