X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fpython%2Fexamples.py;h=68fc95c8306252902ccb0b65a616756fb264c7ab;hp=6b0c04572f4695b027355c77efdc960352901dfb;hb=ce0a5fb9849b6dc0d1347709b28d3a34eefec662;hpb=294ec3ddf9786bddb329646010b165768870ce42 diff --git a/direct/python/examples.py b/direct/python/examples.py index 6b0c045..68fc95c 100644 --- a/direct/python/examples.py +++ b/direct/python/examples.py @@ -1,3 +1,17 @@ +## +## YAFFS: Yet Another Flash File System. A NAND-flash specific file system. +## +## Copyright (C) 2002-2010 Aleph One Ltd. +## for Toby Churchill Ltd and Brightstar Engineering +## +## Created by Charles Manning +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License version 2 as +## published by the Free Software Foundation. +## + + from yaffsfs import * def yaffs_ls(dname): @@ -16,12 +30,12 @@ def yaffs_ls(dname): isDir = True if st.st_mode & 0x4000 else False if isFile : - print "File ",se.d_ino, hex(perms), st.st_size, fullname + print "File ",se.d_ino, hex(perms), st.st_size, fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime elif isDir : - print "Dir ",se.d_ino, hex(perms), fullname + print "Dir ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime yaffs_ls(fullname) else : - print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname + print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime sep = yaffs_readdir(dc) yaffs_closedir(dc) @@ -73,7 +87,7 @@ def yaffs_o_excl_test(dir): root = "/yaffs2" -yaffs_StartUp() +yaffs_start_up() yaffs_mount(root) yaffs_mkdir(root+"/dd",0666) @@ -82,4 +96,3 @@ h = yaffs_open(root+"/dd/111",66,0666) yaffs_close(h) yaffs_ls(root) -