Java 7: Path vs File -


for new applications written in java 7, there reason use java.io.file object more or can consider deprecated?

i believe java.nio.file.path can java.io.file can , more.

long story short:

java.io.file never deprecated / unsupported. said, java.nio.file.path part of more modern java.nio.file lib, , java.io.file can, in better way, , some.

for new projects, use path.

and if ever need file object legacy, call path#tofile()

migrating file path

this oracle page highlights differences, , maps java.io.file functionality java.nio.file lib (including path) functionality

article janice j. heiss , sharon zakhour, may 2009, discussing nio.2 file system in jdk 7


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -