Class: TagLib::FileRef
- Inherits:
-
Object
- Object
- TagLib::FileRef
- Defined in:
- lib/TagLib_doc.rb
Overview
This class provides a simple abstraction for creating and handling files. .
FileRef exists to provide a minimal, generic and value-based wrapper around a File. It is lightweight and implicitly shared, and as such suitable for pass-by-value use. This hides some of the uglier details of TagLib::File and the non-generic portions of the concrete file implementations.This class is useful in a "simple usage" situation where it is desirable to be able to get and set some of the tag information that is similar across file types.Also note that it is probably a good idea to plug this into your mime type system rather than using the constructor that accepts a file name using the FileTypeResolver.FileTypeResolver addFileTypeResolver()
Class Method Summary collapse
-
.defaultFileExtensions ⇒ Object
Singleton methods.
Instance Method Summary collapse
-
#audioProperties ⇒ Object
Returns the audio properties for this FileRef.
-
#file ⇒ Object
Returns a pointer to the file represented by this handler class.As a general rule this call should be avoided since if you need to work with file objects directly, you are probably better served instantiating the File subclasses (i.e. MPEG::File) manually and working with their APIs.This handle exists to provide a minimal, generic and value-based wrapper around a File.
-
#isNull ⇒ Object
Returns true if the file (and as such other pointers) are null.
- #null? ⇒ Boolean
-
#save ⇒ Object
Saves the file.
-
#tag ⇒ Object
Returns a pointer to represented file's tag.This pointer will become invalid when this FileRef and all copies pass out of scope.
Class Method Details
.defaultFileExtensions ⇒ Object
Singleton methods
166 167 |
# File 'lib/TagLib_doc.rb', line 166 def self.defaultFileExtensions() end |
Instance Method Details
#audioProperties ⇒ Object
Returns the audio properties for this FileRef. If no audio properties were read then this will returns a null pointer.
185 186 |
# File 'lib/TagLib_doc.rb', line 185 def audioProperties() end |
#file ⇒ Object
Returns a pointer to the file represented by this handler class.As a general rule this call should be avoided since if you need to work with file objects directly, you are probably better served instantiating the File subclasses (i.e. MPEG::File) manually and working with their APIs.This handle exists to provide a minimal, generic and value-based wrapper around a File. Accessing the file directly generally indicates a moving away from this simplicity (and into things beyond the scope of FileRef).This pointer will become invalid when this FileRef and all copies pass out of scope.
191 192 |
# File 'lib/TagLib_doc.rb', line 191 def file() end |
#isNull ⇒ Object
Returns true if the file (and as such other pointers) are null.
171 172 |
# File 'lib/TagLib_doc.rb', line 171 def isNull() end |
#null? ⇒ Boolean
180 181 |
# File 'lib/TagLib_doc.rb', line 180 def null?() end |
#save ⇒ Object
Saves the file. Returns true on success.
196 197 |
# File 'lib/TagLib_doc.rb', line 196 def save() end |
#tag ⇒ Object
Returns a pointer to represented file's tag.This pointer will become invalid when this FileRef and all copies pass out of scope. File::tag()
178 179 |
# File 'lib/TagLib_doc.rb', line 178 def tag() end |