[php-src] Issue #10210: new function for basic filesystem quota evaluation

From: Date: Mon, 02 Jan 2023 23:15:16 +0000
Subject: [php-src] Issue #10210: new function for basic filesystem quota evaluation
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243315@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10210 Author: bbx-github ### Description It would be nice to have at least some basic filesystem quota information (on blocks) if there is a filesystem quota set up. Maybe this would only work on ext4/xfs/zfs and needs a different implementation for ntfs? To complement disk_free_space/disk_total_space the function could look like this: # Description disk_quota_blocks(string $directory): array|false Given a string containing a directory, this function will return the number of bytes available on the corresponding filesystem or disk partition for the user id calling this function. # Parameters ## directory A directory of the filesystem or disk partition. # Return Values Returns the number of blocks in soft limit and number of blocks used as an array of (two) int or false on failure. # Notes - I am not a php developer and can not help performing a rfc, I guess. - This could be expanded to include hard limit and grace time - Maybe output of bytes instead of blocks is preferable as this matches - A similar function could be created for inodes (disk_quota_inodes) - It gets more complicated if root comes into play and is supposed to get information for other user ids.

« previous php.bugs (#243315) next »