<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PT-BR/fileDelete?action=history&amp;feed=atom</id>
	<title>PT-BR/fileDelete - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PT-BR/fileDelete?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileDelete&amp;action=history"/>
	<updated>2026-04-09T11:39:50Z</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/fileDelete&amp;diff=78697&amp;oldid=prev</id>
		<title>Lettify: Created page with &quot;__NOTOC__ {{BR/Funcao compartilhada}} Deleta um determinado arquivo.  ==Sintaxe== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool fileDelete ( string filePath ) &lt;/syntaxhighlight&gt; {{PT-BR/POO|Esta é uma função estática abaixo da classe File.|File.delete}}  ===Argumentos necessários=== *'''filePath:''' O caminho do arquivo para deletar no seguinte formadt: '''&quot;:resourceName/path&quot;'''. ''resourceName'' é o nome do resource do arquivo que vai estar lá, e ''path''...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileDelete&amp;diff=78697&amp;oldid=prev"/>
		<updated>2023-12-20T17:45:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{BR/Funcao compartilhada}} Deleta um determinado arquivo.  ==Sintaxe== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool fileDelete ( string filePath ) &amp;lt;/syntaxhighlight&amp;gt; {{PT-BR/POO|Esta é uma função estática abaixo da classe File.|&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;.delete}}  ===Argumentos necessários=== *&amp;#039;&amp;#039;&amp;#039;filePath:&amp;#039;&amp;#039;&amp;#039; O &lt;a href=&quot;/wiki/Filepath&quot; title=&quot;Filepath&quot;&gt;caminho&lt;/a&gt; do arquivo para deletar no seguinte formadt: &amp;#039;&amp;#039;&amp;#039;&amp;quot;:resourceName/path&amp;quot;&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;resourceName&amp;#039;&amp;#039; é o nome do resource do arquivo que vai estar lá, e &amp;#039;&amp;#039;path&amp;#039;&amp;#039;...&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;
Deleta um 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;
bool fileDelete ( string filePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{PT-BR/POO|Esta é uma função estática abaixo da classe File.|[[File]].delete}}&lt;br /&gt;
&lt;br /&gt;
===Argumentos necessários===&lt;br /&gt;
*'''filePath:''' O [[filepath|caminho]] do arquivo para deletar no seguinte formadt: '''&amp;quot;:resourceName/path&amp;quot;'''. ''resourceName'' é o nome do resource do arquivo que vai estar lá, e ''path'' é o caminho do arquivo relativo ao diretório do resource.&lt;br /&gt;
:Por exemplo, se você quiser deletar um arquivo chamado ''myFile.txt'' no resource ''fileres'', então esse arquivo poderá ser deletado através de um outro resource dessa forma: &amp;lt;code&amp;gt;fileDelete(&amp;quot;:fileres/myFile.txt&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:Se o arquivo está no resource atual, apenas o caminho do arquivo é necessário, ex.: &amp;lt;code&amp;gt;fileDelete(&amp;quot;myFile.txt&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Retorno===&lt;br /&gt;
Retorna '''true''' se deletado com sucesso, '''false''' caso contrário (por exemplo se o arquivo especificado não existir ou se estiver em uso no momento).&lt;br /&gt;
&lt;br /&gt;
==Exemplo==&lt;br /&gt;
Este exemplo vai mostrar para nós como criar um arquivo chamado &amp;quot;text.txt&amp;quot; e digitar nele ''&amp;quot;This is a test file!&amp;quot;'', então '''fechamos''' o arquivo e o '''deletamos''':&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;)                -- criamos o 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 a linha de texto&lt;br /&gt;
    fileClose(newFile)                                -- fecho o arquivo assim que trabalhar com ele&lt;br /&gt;
    fileDelete(&amp;quot;test.txt&amp;quot;)                            -- deleto o arquivo&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>