Back to index

eyed3  0.6.18
Public Member Functions | Public Attributes | Static Public Attributes
tag.TagFile Class Reference
Inheritance diagram for tag.TagFile:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def getTag
def getSize
def rename
def getPlayTime
def getPlayTimeString

Public Attributes

 fileName
 fileSize

Static Public Attributes

tuple fileName = str("")
tuple fileSize = int(0)
 tag = None;
tuple play_time = int(0)

Detailed Description

Definition at line 1593 of file tag.py.


Constructor & Destructor Documentation

def tag.TagFile.__init__ (   self,
  fileName 
)

Definition at line 1600 of file tag.py.

01600 
01601    def __init__(self, fileName):
01602        self.fileName = fileName;


Member Function Documentation

def tag.TagFile.getPlayTime (   self)

Definition at line 1630 of file tag.py.

01630 
01631    def getPlayTime(self):
01632       return self.play_time;

Here is the caller graph for this function:

Definition at line 1633 of file tag.py.

01633 
01634    def getPlayTimeString(self):
01635       from eyeD3.utils import format_track_time
01636       return format_track_time(self.getPlayTime())
01637 

Here is the call graph for this function:

def tag.TagFile.getSize (   self)

Definition at line 1606 of file tag.py.

01606 
01607    def getSize(self):
01608       if not self.fileSize:
01609          self.fileSize = os.stat(self.fileName)[ST_SIZE];
01610       return self.fileSize;

def tag.TagFile.getTag (   self)

Definition at line 1603 of file tag.py.

01603 
01604    def getTag(self):
01605       return self.tag;

def tag.TagFile.rename (   self,
  name,
  fsencoding 
)

Definition at line 1611 of file tag.py.

01611 
01612    def rename(self, name, fsencoding):
01613        base = os.path.basename(self.fileName);
01614        base_ext = os.path.splitext(base)[1];
01615        dir = os.path.dirname(self.fileName);
01616        if not dir:
01617            dir = ".";
01618        new_name = dir + os.sep + name.encode(fsencoding) + base_ext;
01619 
01620        if os.path.exists(new_name):
01621            raise TagException("File '%s' exists, eyeD3 will not overwrite it" %
01622                               new_name)
01623 
01624        try:
01625            os.rename(self.fileName, new_name);
01626            self.fileName = new_name;
01627        except OSError, ex:
01628            raise TagException("Error renaming '%s' to '%s'" % (self.fileName,
01629                                                                new_name));


Member Data Documentation

tuple tag.TagFile.fileName = str("") [static]

Definition at line 1594 of file tag.py.

Definition at line 1601 of file tag.py.

tuple tag.TagFile.fileSize = int(0) [static]

Definition at line 1595 of file tag.py.

Definition at line 1608 of file tag.py.

tuple tag.TagFile.play_time = int(0) [static]

Reimplemented in tag.Mp3AudioFile.

Definition at line 1598 of file tag.py.

tag.TagFile.tag = None; [static]

Reimplemented in tag.Mp3AudioFile.

Definition at line 1596 of file tag.py.


The documentation for this class was generated from the following file: