<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PT-BR/fileGetSize?action=history&amp;feed=atom</id>
	<title>PT-BR/fileGetSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PT-BR/fileGetSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileGetSize&amp;action=history"/>
	<updated>2026-04-09T11:40:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/fileGetSize&amp;diff=78710&amp;oldid=prev</id>
		<title>Lettify: Created page with &quot;__NOTOC__ {{BR/Funcao compartilhada}}  Retorna o tamanho total (em bytes) de determinado arquivo.  ==Sintaxe== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; int fileGetSize ( file theFile ) &lt;/syntaxhighlight&gt;  {{PT-BR/POO||file:getSize|size}}  ===Argumentos necessários=== *'''theFile:''' o '''arquivo''' que você deseja obter o tamanho total.  ===Retorno=== Retorna o tamanho do arquivo se tiver sido executado com sucesso, ou '''false''' se tiver ocorrido algum erro (ex.: um '''arqui...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileGetSize&amp;diff=78710&amp;oldid=prev"/>
		<updated>2023-12-20T18:55:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{BR/Funcao compartilhada}}  Retorna o tamanho total (em bytes) de determinado arquivo.  ==Sintaxe== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int fileGetSize ( file theFile ) &amp;lt;/syntaxhighlight&amp;gt;  {{PT-BR/POO||&lt;a href=&quot;/index.php?title=File&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;File (page does not exist)&quot;&gt;file&lt;/a&gt;:getSize|size}}  ===Argumentos necessários=== *&amp;#039;&amp;#039;&amp;#039;theFile:&amp;#039;&amp;#039;&amp;#039; o &amp;#039;&amp;#039;&amp;#039;arquivo&amp;#039;&amp;#039;&amp;#039; que você deseja obter o tamanho total.  ===Retorno=== Retorna o tamanho do arquivo se tiver sido executado com sucesso, ou &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039; se tiver ocorrido algum erro (ex.: um &amp;#039;&amp;#039;&amp;#039;arqui...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{BR/Funcao compartilhada}}&lt;br /&gt;
&lt;br /&gt;
Retorna o tamanho total (em bytes) de determinado arquivo.&lt;br /&gt;
&lt;br /&gt;
==Sintaxe==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int fileGetSize ( file theFile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{PT-BR/POO||[[file]]:getSize|size}}&lt;br /&gt;
&lt;br /&gt;
===Argumentos necessários===&lt;br /&gt;
*'''theFile:''' o '''arquivo''' que você deseja obter o tamanho total.&lt;br /&gt;
&lt;br /&gt;
===Retorno===&lt;br /&gt;
Retorna o tamanho do arquivo se tiver sido executado com sucesso, ou '''false''' se tiver ocorrido algum erro (ex.: um '''arquivo''' inválido for especificado)&lt;br /&gt;
&lt;br /&gt;
==Exemplo==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- tentamos criar um novo arquivo&lt;br /&gt;
if (newFile) then                                       -- verificamos se foi criado com sucesso&lt;br /&gt;
	fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- escrevemos uma linha de texto&lt;br /&gt;
	local size = fileGetSize(newFile)              -- obtemos o tamanho&lt;br /&gt;
	if size then&lt;br /&gt;
		outputChatBox(&amp;quot;Size of test.txt is: &amp;quot;..size, source) -- exibimos o tamanho&lt;br /&gt;
        end&lt;br /&gt;
	fileClose(newFile)                                -- fechamos o arquivo depois de trabalharmos com ele&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Veja também==&lt;br /&gt;
{{PT-BR/File functions}}&lt;/div&gt;</summary>
		<author><name>Lettify</name></author>
	</entry>
</feed>