Mercurial > yaffs-ecoscentric-gpl
comparison direct/python/examples.py @ 322:d326b86a50d5
Add more info to python test
| author | charles <charles> |
|---|---|
| date | Thu, 03 Dec 2009 03:28:09 +0000 |
| parents | acc06403a0bc |
| children | bd02b2533ec8 |
comparison
equal
deleted
inserted
replaced
| 321:be04ef15b604 | 322:d326b86a50d5 |
|---|---|
| 15 isFile = True if st.st_mode & 0x8000 else False | 15 isFile = True if st.st_mode & 0x8000 else False |
| 16 isDir = True if st.st_mode & 0x4000 else False | 16 isDir = True if st.st_mode & 0x4000 else False |
| 17 | 17 |
| 18 if isFile : | 18 if isFile : |
| 19 print "File ",se.d_ino, hex(perms), st.st_size, fullname | 19 print "File ",se.d_ino, hex(perms), st.st_size, fullname |
| 20 if isDir : | 20 elif isDir : |
| 21 print "Dir ",se.d_ino, hex(perms), fullname | 21 print "Dir ",se.d_ino, hex(perms), fullname |
| 22 yaffs_ls(fullname) | 22 yaffs_ls(fullname) |
| 23 | 23 else : |
| 24 print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname | |
| 25 | |
| 24 sep = yaffs_readdir(dc) | 26 sep = yaffs_readdir(dc) |
| 25 yaffs_closedir(dc) | 27 yaffs_closedir(dc) |
| 26 return 0 | 28 return 0 |
| 27 else: | 29 else: |
| 28 print "Could not open directory" | 30 print "Could not open directory" |
