src/fs/entity/FileEntity.php
public function getName(bool $includeExtension = false): string
    {
        $filename = basename($this->path);
        if ($includeExtension) {
            return $filename;
        }

        return $this->splitName()[0];
    }
public function getName(bool $includeExtension = false): string
    {
        $filename = basename($this->path);
        if ($includeExtension) {
            return $filename;
        }

        return $this->splitName()[0];
    }
Retrieve the file name with or without an extension

@return string