Calculates the size of the folder, including subfolders, formatting the output folder size, number of files, and the number of subfolders.
The code is as follows
Copy Code
?Code can also be used to statistic the number
This is a PHP program to get the size of the file and the file according to the size of the file display GB,MB,KB code code is very smart code, the code is as follows:
function Sizecount ($filesize) {
if ($filesize >= 1073741824) {
$filesize =
In php, there is a function that comes with the system to calculate the file size, that is, filesize (), but this function is in bytes. in some cases, we need to intuitively understand the size of a file, not only the unit of Byte B, but also the
The php has a system-by-File size function, which is filesize (), but this function is in bytes, in some cases, we need to be very intuitive to understand a file size, not only need byte B this unit, but also need KB,MB,GB, Even bigger TB,PB, so
(Unfinished)
1. The most memory occupied by 2D games is undoubtedly image resources.
2. different platforms of cocos2d-x read different texture mechanisms. Cgimage is used in iOS, While PNG is directly called in Android and windows. I tested
For example, encountered a very large file has 49957289167B, we look at a long string of numbers after the unit is byte B, or do not know the size of this file is a concept, we convert it to GB as a unit, is 46.53GB. Use the following functions to
For example, encounter a very large file 49957289167B, we see a long string of numbers behind the unit is byte B, or do not know the size of this file is a concept, we convert it to GB, that is 46.53GB. The following functions are used to accomplish
For example, encounter a very large file 49957289167B, we see a long string of numbers behind the unit is byte B, or do not know the size of this file is a concept, we convert it to GB, that is 46.53GB. The following functions are used to accomplish
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.