[Ajuda] Re-abrir arquivo
#6

Flags de acordo com a wiki:
Quote:

io_write Writes in a file, clears all earlier written text
io_read Reads the file, the file must exist, otherwise a crash will occur
io_append Appending to a file, writing only
io_readwrite Reads the file or makes a new one

Minha traduзгo e conhecimento p.p:
Quote:

io_write Escreve em um arquivo, limpa tudo que tinha antes
io_read Ler um arquivo
io_append Escreve em um arquivo, nгo limpa tudo que tinha antes
io_readwrite Ler ou escrever

Agora nгo entendi ao certo sua duvida se vocк quer ler um arquivo seria desta forma:
PHP код:
// Open "file.txt" in "read only" mode
new File:handle fopen("file.txt"io_read),
 
    
// Initialize "buf"
    
buf[128];
 
// Check, if the file is opened
if(handle)
{
    
// Success
 
    // Read the whole file
    
while(fread(handlebuf)) print(buf);
 
    
// Close the file
    
fclose(handle);
}
else
{
    
// Error
    
print("The file \"file.txt\" does not exists, or can't be opened.");

Reply


Messages In This Thread
Re-abrir arquivo - by DokyPWN - 03.04.2015, 05:49
Re: Re-abrir arquivo - by Hardware - 03.04.2015, 06:09
Re: Re-abrir arquivo - by DokyPWN - 03.04.2015, 06:12
Re: Re-abrir arquivo - by Hardware - 03.04.2015, 06:35
Re: Re-abrir arquivo - by DokyPWN - 03.04.2015, 13:08
Re: Re-abrir arquivo - by Dayvison_ - 03.04.2015, 15:10
Re: Re-abrir arquivo - by DokyPWN - 03.04.2015, 23:39
Re: Re-abrir arquivo - by Dayvison_ - 03.04.2015, 23:44
Re: Re-abrir arquivo - by DokyPWN - 04.04.2015, 18:00

Forum Jump:


Users browsing this thread: 1 Guest(s)