×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    4

    Listing File System Root

    Hi,

    Is there a way to list file system's root?
    C:\, E:\ ...

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Listing File System Root

    The easiest way to list it is like this:

    Code:
    import appuifw, e32     #appuifw is not really needed here
    
    print e32.drive_list()   #this is the function itself
    
    app_lock=e32.Ao_lock() 
    app_lock.wait()
    For a more complex way of displaying the system root, have a look at the filebrowser script that comes with Python.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    UK
    Posts
    125

    Re: Listing File System Root

    Quote Originally Posted by andmart View Post
    Is there a way to list file system's root?
    C:\, E:\ ...
    If you mean a list of drives, then...

    Code:
    import e32
    print e32.drive_list()
    If you mean the contents of the root directory of a specific drive, then...

    Code:
    import os
    print os.listdir('C:\\')

Similar Threads

  1. setting file attrib
    By mearunsingh in forum Symbian
    Replies: 0
    Last Post: 2008-01-24, 15:12
  2. File Browsing Problem
    By Marwa in forum Mobile Java Networking & Messaging & Security
    Replies: 13
    Last Post: 2007-10-10, 15:52
  3. Accessing resources like file system in paused state.
    By anoopks in forum Mobile Java General
    Replies: 3
    Last Post: 2007-05-16, 20:22
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Symbian File System
    By gargidasgupta in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-09-20, 08:52

Posting Permissions

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