Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6de4359 commit 7101ad0Copy full SHA for 7101ad0
src/Symfony/Component/HttpFoundation/File/File.php
@@ -133,4 +133,18 @@ protected function getName($name)
133
134
return $originalName;
135
}
136
+
137
+ /**
138
+ * {@inheritdoc}
139
+ */
140
+ public function getSize()
141
+ {
142
+ // Get the file size from a stream rather than from disk in case it is changed later by
143
+ // stream wrappers or stream filters.
144
+ $file = fopen($this->getPathname(), 'rb');
145
+ $fstat = fstat($file);
146
+ fclose($file);
147
148
+ return $fstat['size'];
149
+ }
150
0 commit comments