Skip to content

Commit c854b88

Browse files
committed
fix(file-io): 🐛 files, ajustes no texto
1 parent ed5cea1 commit c854b88

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

book/07-file-io/sections/02-files.asc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Path 3 e Path 4 são iguais? true
6060
Path 1 e Path 4 são iguais? true
6161
----
6262
+
63-
Perceba que nesse exemplo todos os `Path` são iguais, pois apontam para o mesmo arquivo. Ou seja, o método realmetne verifica se o arquivo no sistema de arquivos é o mesmo, indepenente da forma como o diretório está sendo representado no `Path`. Isso funcionará inclusive para links simbólicos que apontam para o mesmo arquivo.
63+
Perceba que nesse exemplo todos os `Path` são iguais, pois apontam para o mesmo arquivo. Ou seja, o método realmente verifica se o arquivo no sistema de arquivos é o mesmo, independente da forma como o diretório está sendo representado no `Path`. Isso funcionará inclusive para links simbólicos que apontam para o mesmo arquivo.
6464

6565
. É possível criar arquivos utilizando a classe `Files`.
6666
+
@@ -353,6 +353,7 @@ Data de Criação alterada: 2019-08-14T19:24:32.995Z
353353
+
354354
Perceba que a partir da classe `BasicFileAttributeView` também é possível ler os atributos do arquivo chamando o método `readAttributes`.
355355

356+
.Referências
356357
****
357358
358359
* Introducing NIO.2
@@ -365,4 +366,4 @@ Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8
365366
366367
* https://docs.oracle.com/javase/tutorial/essential/io/pathOps.html[Path Operations.] The Java™ Tutorials.
367368
368-
****
369+
****

src/org/j6toj8/fileio/files/Files_DeletePath.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public static void main(String[] args) {
2525
Files.createFile(path);
2626
System.out.println("Path existe? " + Files.exists(path));
2727

28-
Files.delete(path); // tenta apagadar o Path e lança exceção se ele não existir
28+
Files.delete(path); // tenta apagar o Path e lança exceção se ele não existir
2929
System.out.println("Path existe? " + Files.exists(path));
3030

31-
Files.deleteIfExists(path); // tenta apagadar o Path e não faz nada se ele não existir
31+
Files.deleteIfExists(path); // tenta apagar o Path e não faz nada se ele não existir
3232
System.out.println("Path existe? " + Files.exists(path));
3333
} catch (IOException e) {
3434
e.printStackTrace();

0 commit comments

Comments
 (0)