+

PHP Filesystem getFlags () Function

Syntax:
int FilesystemIterator::getFlags (void)
Parameters:This function takes no parameters.Return value:This function returns an integer value representing a set of flags.Below the program illustrate the FilesystemIterator::getFlags() function in PHP:Program 1:  
// Create a new file system iterator $fileItr = new FilesystemIterator (__ DIR__, FilesystemIterator::CURRENT_AS_PATHNAME);  
// Save the flag $flag = $fileItr -> getFlags();  
// Show flag var_dump ( $flag );  
?>
Exit:
int (4128 )
Program 2:  
// Create a new file system iterator $fileItr = new FilesystemIterator (__ DIR__, FilesystemIterator::CURRENT_AS_PATHNAME);  
// Set flag $fileItr -> setFlags (FilesystemIterator::KEY_AS_FILENAME);  
// Get the flag $flag = $fileItr -> getFlags();  
// Show flag var_dump ( $flag );  
?>
Exit:
int (256 )
Link: https://www.php.net /manual/en/filesystemiterator.getflags.php
Get Solution for free from DataCamp guru