Path dir = Paths.get("tmp")
WatchKey key = dir.register (watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY)
;
In the tmp directory, the user renames the file testA to testB,
Which statement is true?
A.
The events received and the order of events are consistent across all
platforms.
B.
The events received and the order of events are consistent across all
Microsoft Windows versions.
C.
The events received and the order of events are consistent across all
UNIX platforms.
D.
The events received and the order of events are platform dependent.
Risposta: A
Infatti se il file system ha un meccanismo
di controllo per i cambiamenti nei file le API se ne avvantaggiano, altrimenti vanno
in polling aspettando gli eventi.
Riferimento:
http://docs.oracle.com/javase/tutorial/essential/io/notification.html
Nessun commento:
Posta un commento