Beispiel #1
0
 def __addProfileInode(self):
     #
     # Add the profile file
     #
     profile = self.youtubeUser.getProfile()
     mode = stat.S_IFREG | 0444
     profileInode = YoutubeFSInode('/profile',mode,\
             0,profile.ctime,profile.mtime)
     profileInode.ctime = profile.ctime
     profileInode.mtime = profile.mtime
     profileInode.setData(profile.getData())
     self.inodeCache.addInode(profileInode)
     rootDirInode = self.inodeCache.getInode('/')
     rootDirInode.addChildInode(profileInode)
Beispiel #2
0
 def __addProfileInode(self):
     #
     # Add the profile file
     #
     profile = self.youtubeUser.getProfile()
     mode = stat.S_IFREG | 0444
     profileInode = YoutubeFSInode('/profile',mode,\
             0,profile.ctime,profile.mtime)
     profileInode.ctime  = profile.ctime
     profileInode.mtime  = profile.mtime
     profileInode.setData(profile.getData())
     self.inodeCache.addInode(profileInode) 
     rootDirInode = self.inodeCache.getInode('/')
     rootDirInode.addChildInode(profileInode)
Beispiel #3
0
 def __addVideos(self, parentPath, videos):
     logging.debug("YoutubeFUSE adding videos inodes to %s",\
         parentPath)
     parentInode = self.inodeCache.getInode(parentPath)
     for video in videos:
         logging.debug("YoutubeFUSE adding video %s", video.title)
         mode = stat.S_IFREG | 0444
         path = ("%s/%s.%s") % (parentPath,video.title,\
                     youtube.fs.VIDEO_FILE_EXTENSION)
         videoInode =  YoutubeFSInode(path,mode,\
                     video.id,video.ctime,video.mtime)
         videoInode.setData(video.getContents())
         self.inodeCache.addInode(videoInode)
         parentInode.addChildInode(videoInode)
Beispiel #4
0
 def __addVideos(self,parentPath,videos):
     logging.debug("YoutubeFUSE adding videos inodes to %s",\
         parentPath)
     parentInode =  self.inodeCache.getInode(parentPath)
     for video in videos:
         logging.debug("YoutubeFUSE adding video %s",video.title)
         mode = stat.S_IFREG | 0444
         path = ("%s/%s.%s") % (parentPath,video.title,\
                     youtube.fs.VIDEO_FILE_EXTENSION)
         videoInode =  YoutubeFSInode(path,mode,\
                     video.id,video.ctime,video.mtime)
         videoInode.setData(video.getContents())
         self.inodeCache.addInode(videoInode) 
         parentInode.addChildInode(videoInode)