Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Read/Write File in flash memory


  • Please log in to reply
No replies to this topic

#1 Tayfun

Tayfun

    New Member

  • Members
  • Pip
  • 2 posts

Posted 26 October 2011 - 01:01 PM

Hello, I want my application to read a configuration file and I do not want this file to be stored in SD. The fact is that this piece of code : ----------------------------------------------------------------------------------------------- try { Directory.SetCurrentDirectory(CRootDirectory); if (Directory.Exists(CConfigurationDirectory)) { Directory.SetCurrentDirectory(CConfigurationDirectory); if (File.Exists(CBoxNumberFile)) { FileStream file = new FileStream(CBoxNumberFile, FileMode.Open); boxNumber = file.ReadByte().ToString(); file.Close(); } } } catch (Exception) { } ----------------------------------------------------------------------------------------------- works when CRootDirectory = "\\SD" but fails when CRootDirectory = "\\". On "if (Directory.Exists(CConfigurationDirectory))" I have an exception... Is there a way to store/read files in others places that SD ? Can you explain me how ???




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.