<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PT-BR/fileRename?action=history&amp;feed=atom</id>
	<title>PT-BR/fileRename - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PT-BR/fileRename?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileRename&amp;action=history"/>
	<updated>2026-05-17T19:30:17Z</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/fileRename&amp;diff=78720&amp;oldid=prev</id>
		<title>Lettify: Created page with &quot;__NOTOC__ {{BR/Funcao compartilhada}}  Renomeia o arquivo que especificar.  {{BR/Nota|Com esta função você também pode mover determinado arquivo para um lugar diferente, seja uma pasta diferente no resource atual ou até mesmo para a pasta de um outro resource. Mas para fazer isso o resource deve ter a seguinte permissão da ACL definida para ''true'': 'ModifyOtherObjects'.}}  ==Sintaxe== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool fileRename ( string filePath, string newFileP...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileRename&amp;diff=78720&amp;oldid=prev"/>
		<updated>2023-12-20T19:50:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{BR/Funcao compartilhada}}  Renomeia o arquivo que especificar.  {{BR/Nota|Com esta função você também pode mover determinado arquivo para um lugar diferente, seja uma pasta diferente no resource atual ou até mesmo para a pasta de um outro resource. Mas para fazer isso o resource deve ter a seguinte permissão da ACL definida para &amp;#039;&amp;#039;true&amp;#039;&amp;#039;: &amp;#039;ModifyOtherObjects&amp;#039;.}}  ==Sintaxe== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool fileRename ( string filePath, string newFileP...&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;
Renomeia o arquivo que especificar.&lt;br /&gt;
&lt;br /&gt;
{{BR/Nota|Com esta função você também pode mover determinado arquivo para um lugar diferente, seja uma pasta diferente no resource atual ou até mesmo para a pasta de um outro resource. Mas para fazer isso o resource deve ter a seguinte permissão da ACL definida para ''true'': 'ModifyOtherObjects'.}}&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 fileRename ( string filePath, string newFilePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{PT-BR/POO|Esta é uma função estática abaixo da classe File.|[[File]].rename}}&lt;br /&gt;
&lt;br /&gt;
===Argumentos necessários===&lt;br /&gt;
*'''filePath:''' O [[filepath|caminho]] do arquivo a ser criado seguindo o seguinte formato: '''&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;
*'''newFilePath:''' O [[filepath|caminho]] de destino para o arquivo especificado no mesmo formato.&lt;br /&gt;
&lt;br /&gt;
===Retorno===&lt;br /&gt;
Se renomeado com sucesso, retorna '''true'''. Caso contrário retorna '''false'''.&lt;br /&gt;
&lt;br /&gt;
==Exemplo==&lt;br /&gt;
Este exemplo renomeia o arquivo ''test1.txt'' que está na raiz do resource atual, para ''test2.txt''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if fileRename( &amp;quot;test1.txt&amp;quot;, &amp;quot;test2.txt&amp;quot; ) then&lt;br /&gt;
    outputConsole(&amp;quot;File `test1.txt` successfully renamed to `test2.txt`&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputConsole(&amp;quot;Unable to rename `test1.txt`&amp;quot;)&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Este exemplo move o arquivo ''test1.txt'' que está na raiz do resource atual para a pasta ''myFolder''. Se esta pasta não existir, será criada antes desse arquivo ser movido para lá.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if fileRename( &amp;quot;test1.txt&amp;quot;, &amp;quot;myFolder/test1.txt&amp;quot; ) then&lt;br /&gt;
    outputConsole(&amp;quot;File `test1.txt` successfuly moved to `myFolder` folder&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
    outputConsole(&amp;quot;Unable to move `test1.txt`&amp;quot;)&lt;br /&gt;
end&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>