filegroup
Description
The filegroup of Filesystem for PHP gets file group.
Syntax
filegroup( string $filename ): int|false
Parameters
filename
Path to the file.
Return
Returns the group ID of the file, or false if an error occurs. The group ID is returned in numerical format, use posix_getgrgid() to resolve it to a group name. Upon failure, false is returned.
Examples
1 · filename
<? $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt'; $return = filegroup($filename); print_r($return);
1234567
2 · posix_getgrgid
<? $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt'; $return = filegroup($filename); $posix_getgrgid = posix_getgrgid($return); print_r($posix_getgrgid);
Array ( [name] => root [passwd] => x [members] => Array ( ) [gid] => 1234567 )
Links
Related
Filesystem
- basename
- chgrp
- chmod
- chown
- clearstatcache
- copy
- dirname
- disk_free_space
- disk_total_space
- diskfreespace
- fclose
- feof
- fflush
- fgetc
- fgetcsv
- fgets
- file
- file_exists
- file_get_contents
- file_put_contents
- fileatime
- filectime
- fileinode
- filemtime
- fileowner
- fileperms
- filesize
- filetype
- flock
- fnmatch
- fopen
- fpassthru
- fputcsv
- fputs
- fread
- fscanf
- fseek
- fstat
- ftell
- ftruncate
- fwrite
- glob
- is_dir
- is_executable
- is_file
- is_link
- is_readable
- is_uploaded_file
- is_writable
- is_writeable
- lchgrp
- lchown
- link
- linkinfo
- lstat
- mkdir
- move_uploaded_file
- pathinfo
- pclose
- popen
- readfile
- readlink
- realpath
- realpath_cache_get
- realpath_cache_size
- rename
- rewind
- rmdir
- set_file_buffer
- stat
- symlink
- tempnam
- tmpfile
- touch
- umask
- unlink