Where is the correct place to store my application specific data?

Question 2: I suggest using a subfolder in Environment.SpecialFolder.CommonAppData (maps to C:\ProgramData on Windows7 by default). This is a hidden folder. Question 3: Put those files into Environment.SpecialFolder.AppData(maps to C:\Users\[USERNAME]\AppData\Roaming by default, hidden folder), if you expect that the user does not intend to backup / modify those. Some games also put their save games … Read more

Web application access user’s file system

Finally I did a compilation of some quotations and it is done.. https://en.wikipedia.org/wiki/JavaScript#Security scripts run in a sandbox in which they can only perform Web-related actions, not general-purpose programming tasks like creating files https://www.us-cert.gov/publications/securing-your-web-browser JavaScript, also known as ECMAScript, is a scripting language that is used to make websites more interactive. There are specifications in … Read more

Iterate through every file in one directory

As others have said, Dir::foreach is a good option here. However, note that Dir::foreach and Dir::entries will always include . and .. (the current and parent directories). You will generally not want to work on them, so you can use Dir::each_child or Dir::children (as suggested by ma11hew28) or do something like this: Dir.foreach(‘/path/to/dir’) do |filename| … Read more

Directory listener in Java

Since Java 1.7 you can use the Watch Service API to register for directory events. It is part of Java’s New I/O (NIO) library and does not require any additional resources. An example how to use the API can be found in the official documentation. After registering the WatchService you can retrieve events for the … Read more