Class TagLib::File
In: lib/TagLib_doc.rb
Parent: Object
AudioProperties Properties Properties Properties Properties Properties Properties Properties File File File File File File File Tag Tag Tag Tag XiphComment File File File Frame AttachedPictureFrame CommentsFrame Header ByteVectorList ByteVector FrameList ItemListMap GenreMap FileRef FrameListMap StringList FieldListMap String Item Footer FrameFactory GeneralEncapsulatedObjectFrame Page PageHeader XingHeader Header MPC APE Vorbis ID3v1 FLAC ID3v2 Flac Speex Ogg MPEG WavPack TrueAudio TagLib dot/f_3.png

A file class with some useful methods for tag manipulation. .

This class is a basic file class with some methods that are particularly useful for tag editors. It has methods to take advantage of ByteVector and a binary search method for finding patterns in a file.

Methods

audioProperties   clear   find1   find2   find3   insert   isOpen   isValid   isWritable   length   name   open?   readBlock   readOnly   read_only?   removeBlock   rfind   save   seek   tag   tell   valid?   writable?   writeBlock  

Public Instance methods

Returns a pointer to this file's audio properties. This should be reimplemented in the concrete subclasses. If no audio properties were read then this will return a null pointer.

[Source]

# File lib/TagLib_doc.rb, line 359
      def audioProperties()
      end

Reset the end-of-file and error flags on the file.

[Source]

# File lib/TagLib_doc.rb, line 344
      def clear()
      end

[Source]

# File lib/TagLib_doc.rb, line 339
      def find1()
      end

[Source]

# File lib/TagLib_doc.rb, line 361
      def find2()
      end

[Source]

# File lib/TagLib_doc.rb, line 381
      def find3()
      end

Insert data at position start in the file overwriting replace bytes of the original content.This method is slow since it requires rewriting all of the file after the insertion point.

[Source]

# File lib/TagLib_doc.rb, line 379
      def insert( ByteVector  data,ulong start = 0,ulong replace = 0)
      end

Since the file can currently only be opened as an argument to the constructor (sort-of by design), this returns if that open succeeded.

[Source]

# File lib/TagLib_doc.rb, line 388
      def isOpen()
      end

Returns true if the file is open and readble and valid information for the Tag and / or AudioProperties was found.

[Source]

# File lib/TagLib_doc.rb, line 337
      def isValid()
      end

[Source]

# File lib/TagLib_doc.rb, line 373
      def isWritable()
      end

Returns the length of the file.

[Source]

# File lib/TagLib_doc.rb, line 403
      def length()
      end

Returns the file name in the local file system encoding.

[Source]

# File lib/TagLib_doc.rb, line 312
      def name()
      end

[Source]

# File lib/TagLib_doc.rb, line 332
      def open?()
      end

Reads a block of size length at the current get pointer.

[Source]

# File lib/TagLib_doc.rb, line 398
      def readBlock(ulong length)
      end

Returns true if the file is read only (or if the file can not be opened).

[Source]

# File lib/TagLib_doc.rb, line 354
      def readOnly()
      end

[Source]

# File lib/TagLib_doc.rb, line 383
      def read_only?()
      end

Removes a block of the file starting a start and continuing for length bytes.This method is slow since it involves rewriting all of the file after the removed portion.

[Source]

# File lib/TagLib_doc.rb, line 330
      def removeBlock(ulong start = 0,ulong length = 0)
      end

Returns the offset in the file that pattern occurs at or -1 if it can not be found. If before is set, the search will only continue until the pattern before is found. This is useful for tagging purposes to search for a tag before the synch frame.Searching starts at fromOffset and proceeds from the that point to the beginning of the file and defaults to the end of the file.This has the practial limitation that pattern can not be longer than the buffer size used by readBlock(). Currently this is 1024 bytes.

[Source]

# File lib/TagLib_doc.rb, line 409
      def rfind( ByteVector  pattern,long fromOffset = 0, ByteVector  before = ByteVector::null)
      end

Save the file and its associated tags. This should be reimplemented in the concrete subclasses. Returns true if the save succeeds.On UNIX multiple processes are able to write to the same file at the same time. This can result in serious file corruption. If you are developing a program that makes use of TagLib from multiple processes you must insure that you are only doing writes to a particular file from one of them.

[Source]

# File lib/TagLib_doc.rb, line 371
      def save()
      end

Move the I/O pointer to offset in the file from position p. This defaults to seeking from the beginning of the file.Position

[Source]

# File lib/TagLib_doc.rb, line 318
      def seek(long offset,Position p = Beginning)
      end

Returns a pointer to this file's tag. This should be reimplemented in the concrete subclasses.

[Source]

# File lib/TagLib_doc.rb, line 349
      def tag()
      end

Returns the current offset withing the file.

[Source]

# File lib/TagLib_doc.rb, line 393
      def tell()
      end

[Source]

# File lib/TagLib_doc.rb, line 365
      def valid?()
      end

[Source]

# File lib/TagLib_doc.rb, line 363
      def writable?()
      end

Attempts to write the block data at the current get pointer. If the file is currently only opened read only — i.e. readOnly() returns true — this attempts to reopen the file in read/write mode.This should be used instead of using the streaming output operator for a ByteVector. And even this function is significantly slower than doing output with a char[].

[Source]

# File lib/TagLib_doc.rb, line 324
      def writeBlock( ByteVector  data)
      end

[Validate]