×

Discussion Board

Results 1 to 4 of 4

Thread: file opening

  1. #1
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    54

    file opening

    hi,
    For my application i am maintaining a config file(a .txt file) in which all the attributes are saved. This is stored in C:\\Data. The data in this .txt file should be read only. I tried opening file in EFileShareReadersOnly|EFileWrite but it does not work beacuse those 2 options cannot be used together.

    If not readonly, i want to make the file a binary file so that it is not understandable. i made the file .bin and opened using EFileStream|EFileWrite.....even then when i test in mobile....the file opens and it is human readable. Please help

    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: file opening

    Why are you trying to open a read-only file with "EFileWrite"? Also read the docs:
    Quote Originally Posted by SDK Help
    Read-only sharing.


    This means that the file may only be accessed for reading. A file cannot be opened using a share mode of EFileShareReadersOnly with an EFileWrite flag.

  3. #3
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    54

    Re: file opening

    I have to make changes in the file but it should be a readonly file for others.

  4. #4
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: file opening

    If your concern is synchronization, use a lock. See RFile::Lock()
    Otherwise, you may use encryption, but this won't prevent the file to be written by others, unless you work with data caging, which is available since v9

Similar Threads

  1. Theme Studio 3.1 not creating themes
    By zemm in forum Themes/Carbide.ui
    Replies: 11
    Last Post: 2008-10-18, 08:41
  2. know file size without opening the file
    By venunet in forum Symbian C++
    Replies: 7
    Last Post: 2007-03-20, 07:58
  3. Problem: opening a file with RFile::Open()
    By dermotkehoe in forum Symbian C++
    Replies: 7
    Last Post: 2006-02-09, 18:41
  4. How to reformat the file?
    By ryanfunghk in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-03-26, 17:43
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •