2

Do files or folders on S60 have some unique id value that can identify them?

I would like to have an id that can be later used to extract full path of a file or folder. Is this achievable?

If not, what would be the best way to keep track of files of interest? E.g. if I have a pdf reader, and I want to have a menu option to show all pdf files on the system - how do I prevent my application to search all over the whole system every time I chose this option? Can I search it once and easily monitor changes while my application is active?

Thank you.

Bojan Milankovic
  • 847
  • 3
  • 11
  • 23

3 Answers3

1

I can't quite see anything in the Symbian OS C++ API that would do exactly what you want.

Using RFs::NotifyChange() is probably your best bet.

michael aubert
  • 6,836
  • 1
  • 16
  • 32
  • RFs::NotifyChange() has a drawback that there is no much information on what change triggered the event. For instance, if I have a 3000 files under C:\\Documents\\, and a new one is created, there 3001 files, but I have to go through all of these, create a list of new files, and to compare a new list of 3001 files with the list of 3000 files just to find out what file has been created. That is an overkill! – Bojan Milankovic Dec 03 '09 at 21:50
  • CFileMan is your friend here but, yes, it's a lot of processing required for something that should be simple. Feel free to contact the Symbian Kernel and Hardware Services package owner about adding this to the platform. – michael aubert Dec 04 '09 at 10:19
  • 1
    I added the framework you're speculating about this summer. It's due to be in 10.1 I believe. The code is already released but disabled. Take a look at CFsNotify http://developer.symbian.org/xref/epl/xref/MCL/sf/os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32notification.h#140 – Dynite Feb 04 '10 at 17:15
0

Yes, index them at one point and use RFs::NotifyChange(). How would an ID help in identifying new files?

  • ID would help, as I could only keep track of IDs instead of full path. If there was an id, the operating system would keep track of moving a file from one location to another, I would not have to update my internal list of files. – Bojan Milankovic Dec 03 '09 at 21:49
  • I see your point. Having a UID for a file that is independent of pathname would be good, yes. – Sebastian Brannstrom Dec 07 '09 at 13:27
0

Symbian Timebox 10.1 (^3?) introduces a new file notification API, CFsNotify.

If tells you exactly what has changed and to which file/dir/drive.

http://developer.symbian.org/xref/epl/xref/MCL/sf/os/kernelhwsrv/userlibandfileserver/fileserver/inc/f32notification.h#140

It is similar to Microsoft's ReadDirectoryChangesW API.

Dynite
  • 2,313
  • 5
  • 30
  • 38