• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Trouble reading modified date from network share

 
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolved the problem I had with reading and writing JSON files from a network share, but then I ran into a problem with reading the modified date of a network shared file.
I researched the required code and came up with the following but the file date always ends up 0.
Here is the actual output on the console:
smb://nsp.local/pi/sprinkler/status.json pi 0

Can someone help me understand what is wrong?

 
Saloon Keeper
Posts: 2685
341
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't answer your Mac-specific question, but if I run your code on a Windows platform, the date does get reported properly.
 
Ron McLeod
Saloon Keeper
Posts: 2685
341
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works on Mac 10.11.6 as well
 
Mike Gauthier
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got this working.  I had been working on the schedule.json file for 7-8 days and when I started working on the status file I used status.json.  Problem is, the file name is actually status.txt!

I changed it and all is well now.

I thought everything was okay because there was no error being thrown. Guess that's normal for file not found with the modified date call.

 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!