downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplFileInfo::isDir> <SplFileInfo::getSize
[edit] Last updated: Fri, 24 Jun 2011

view this page in

SplFileInfo::getType

(PHP 5 >= 5.1.2)

SplFileInfo::getTypeدریافت نوع فایل

Description

public string SplFileInfo::getType ( void )

بازگرداندن نوع فایل ارجاع شده.

Parameters

This function has no parameters.

Return Values

string نمایش دهنده نوع ورودی. یکی از file، link, یا dir

Errors/Exceptions

ایجاد RuntimeException در صورت خطا.

Examples

Example #1 مثال SplFileInfo::getType()

<?php

$info 
= new SplFileInfo(__FILE__);
echo 
$info->getType().PHP_EOL;

$info = new SplFileInfo(dirname(__FILE__));
echo 
$info->getType();

?>

The above example will output something similar to:

file
dir



add a note add a note User Contributed Notes SplFileInfo::getType - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites