Questions tagged as 'arquivo'

1
answer

How to move files read by StreamReader in C #?

I'm trying to move some files. For each file containing the word "TEST" in your body, my application indicates that it is an item found. The goal is to move them to another directory. Here is the code below: string[] Lista = new string[] { "TE...
asked by 19.10.2014 / 02:27
1
answer

File reading in C

I'm doing a project in C, which requires creating and reading a file. I'm having trouble implementing the reading. In reading I have already tried to apply fgets() , fscanf() and fread() . But none worked. Does anyone suggest...
asked by 09.11.2015 / 06:44
2
answers

How to save files to a server via Java?

I need to save a file to a server using Java . In my case, I need to save a json file. Can I save a file normally on my computer, but how do I save directly to a remote server? Here is an example that saves a file to my computer. My...
asked by 02.12.2015 / 16:45
1
answer

How to display data from a serialized file in Java?

I'm starting in Java and need to make a system that registers students and saves the data of those students in a serialized file. I can even create and save the data in the serialized file (I think rsrs) but I do not know how to display all t...
asked by 01.11.2017 / 21:35
1
answer

Read files in a directory sorted by creation date

I have the following code to include all the PHP files I find in a directory: if (is_dir(CONF_REL_PATH_BANANAS)) { foreach (glob(CONF_REL_PATH_BANANAS.'/*.php') as $file) { require_once($file); } } When sending the files there, I...
asked by 13.01.2014 / 21:19
5
answers

Capture name of files in directory

The following method takes the name of the files of a certain directory and displays them on the screen, the problem is that .listfiles() returns the number of bytes and not the number of files, although it shows the files name just havin...
asked by 26.02.2016 / 16:33
2
answers

Why is it necessary to close the file?

Why is this line required in Java? fout.close(); Context: LinkedList values = new LinkedList(classe.getTurma().values()); if (!values.isEmpty()) { FileOutputStream fout = null; String FILE = "TURMA"; try {...
asked by 30.11.2017 / 17:59
4
answers

Count distinct names saved in txt

I have a txt file with users' names separated by line as follows: diego sergio antonio maria diego antonio Note that names can repeat, and I would like to list and list only the distinguished names. I made this method to list the whole f...
asked by 16.02.2016 / 11:19
2
answers

Is it possible to copy directory names without copying their contents?

For some time I've done this question about recursive search in folders, and now I need to adapt to a different condition. I need to copy just the names of subfolders from a top folder to a third folder, but without copying the most inter...
asked by 20.02.2017 / 17:04
2
answers

How to read data from txt files using Java?

Is there a mechanism for storing the data of a .txt file in a LinkedList? For example, how would this list have the Strings "Caio", "Peter" and "Luiza" as elements? import java.io.*; public class teste { public static void main ( S...
asked by 15.07.2015 / 22:20