(Redirected from How to handle file metadata)

Archived:How to handle file metadata in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

This snippet shows how to read file metadata in.

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Platform(s): S60 1st Edition, S60 2nd Edition, S60 3rd Edition
Platform Security
Capabilities: )
Keywords: os
Created: bogdan.galiceanu (17 Apr 2008)
Last edited: hamishwillee (08 May 2013)

Source code

import os, time
#Get the information for a file
statinfo = os.stat("C:\\Python\\ball.py")
#Display it
print "Size: " + str(statinfo.st_size)
print "Last modified: " + time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime(statinfo.st_mtime))
print "Protection bits: " + str(statinfo.st_mode)
print "Inode number: " + str(statinfo.st_ino)
print "Device: " + str(statinfo.st_dev)
print "Number of hard links: " + str(statinfo.st_nlink)
print "User ID of owner: " + str(statinfo.st_uid)
print "Group ID of owner: " + str(statinfo.st_gid)


The information about the file is displayed.

This page was last modified on 8 May 2013, at 08:25.
59 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.