<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PT-BR/fileCopy?action=history&amp;feed=atom</id>
	<title>PT-BR/fileCopy - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PT-BR/fileCopy?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileCopy&amp;action=history"/>
	<updated>2026-05-16T03:01:24Z</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/fileCopy&amp;diff=81358&amp;oldid=prev</id>
		<title>Fernando187: Remove obsolete Requirements section</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileCopy&amp;diff=81358&amp;oldid=prev"/>
		<updated>2024-11-07T17:34:16Z</updated>

		<summary type="html">&lt;p&gt;Remove obsolete Requirements section&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:34, 7 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/section&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/section&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Requirements|1.3.1|1.3.1}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Veja também==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Veja também==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{PT-BR/File functions}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{PT-BR/File functions}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-78696:rev-81358 --&gt;
&lt;/table&gt;</summary>
		<author><name>Fernando187</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/fileCopy&amp;diff=78696&amp;oldid=prev</id>
		<title>Lettify: Created page with &quot;{{BR/Funcao compartilhada}} __NOTOC__ Esta função copia um arquivo. {{BR/Nota|As funções que manipulam arquivos não devem ser utilizadas para implementar arquivos de configuração. É recomendado usar as funções XML.}} {{BR/Tip|Se você não quiser compartilhar o conteúdo do arquivo criado com outros servidores, nomeie o caminho do arquivo com '''@''' no início. Veja a página filepath para entender melhor.}}  ==...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/fileCopy&amp;diff=78696&amp;oldid=prev"/>
		<updated>2023-12-20T17:35:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{BR/Funcao compartilhada}} __NOTOC__ Esta função copia um arquivo. {{BR/Nota|As funções que manipulam arquivos não devem ser utilizadas para implementar arquivos de configuração. É recomendado usar as &lt;a href=&quot;/wiki/Shared_Scripting_Functions#XML_functions&quot; title=&quot;Shared Scripting Functions&quot;&gt;funções XML&lt;/a&gt;.}} {{BR/Tip|Se você não quiser compartilhar o conteúdo do arquivo criado com outros servidores, nomeie o caminho do arquivo com &amp;#039;&amp;#039;&amp;#039;@&amp;#039;&amp;#039;&amp;#039; no início. Veja a página &lt;a href=&quot;/wiki/Filepath&quot; title=&quot;Filepath&quot;&gt;filepath&lt;/a&gt; para entender melhor.}}  ==...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{BR/Funcao compartilhada}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Esta função copia um arquivo.&lt;br /&gt;
{{BR/Nota|As funções que manipulam arquivos não devem ser utilizadas para implementar arquivos de configuração. É recomendado usar as [[Shared_Scripting_Functions#XML_functions|funções XML]].}}&lt;br /&gt;
{{BR/Tip|Se você não quiser compartilhar o conteúdo do arquivo criado com outros servidores, nomeie o caminho do arquivo com '''@''' no início. Veja a página [[filepath]] para entender melhor.}}&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 fileCopy ( string filePath, string copyToFilePath [, bool overwrite = false ] )&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]].copy}}&lt;br /&gt;
&lt;br /&gt;
===Argumentos necessários===&lt;br /&gt;
* '''filePath''': O caminho do arquivo que você quer copiar.&lt;br /&gt;
* '''copyToFilePath''': Para onde o arquivo copiado deve ir.&lt;br /&gt;
&lt;br /&gt;
===Argumentos opcionais===&lt;br /&gt;
* '''overwrite''': Se definido para '''true''' esta operação vai sobrescrever o arquivo que já existir no caminho especificado em ''copyToFilePath''.&lt;br /&gt;
&lt;br /&gt;
==Retorno==&lt;br /&gt;
Retorna '''true''' se o arquivo foi copiado com sucesso, do caso contrário retorna '''false''' se o ''filePath'' não existir.&lt;br /&gt;
&lt;br /&gt;
==Exemplo==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Lado server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Este exemplo copia um arquivo chamado 'test.txt' e o chama de 'test1.txt'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, function(res)&lt;br /&gt;
    local filePath = &amp;quot;:&amp;quot;..getResourceName(res)..&amp;quot;/test.txt&amp;quot;&lt;br /&gt;
    fileCreate(filePath) --cria o arquivo no resource o nomeia como 'test.txt'.&lt;br /&gt;
    if fileCopy(filePath, &amp;quot;:&amp;quot;..getResourceName(res)..&amp;quot;/test1.txt&amp;quot;) then&lt;br /&gt;
         outputChatBox(&amp;quot;File was successfully copied!&amp;quot;, root, 0, 100, 0)&lt;br /&gt;
    else&lt;br /&gt;
         outputChatBox(&amp;quot;File was not successfully copied, probably because it doesn't exist.&amp;quot;, root, 100, 0, 0)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Lado client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Este exemplo copia um arquivo chamado 'test.txt' e o chama de 'test1.txt'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot, function(res)&lt;br /&gt;
    local filePath = &amp;quot;:&amp;quot;..getResourceName(res)..&amp;quot;/test.txt&amp;quot;&lt;br /&gt;
    fileCreate(filePath) --cria o arquivo no resource o nomeia como 'test.txt'.&lt;br /&gt;
    if fileCopy(filePath,&amp;quot;:&amp;quot;..getResourceName(res)..&amp;quot;/test1.txt&amp;quot;) then&lt;br /&gt;
         outputChatBox(&amp;quot;File was successfully copied!&amp;quot;, 0, 100, 0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;File was not successfully copied, probably because it doesn't exist.&amp;quot;, 100, 0, 0)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Requirements|1.3.1|1.3.1}}&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>