1

On Mac OS X right clicking a file and choosing "Get Info" reveals a "More Info" section.

I'm specifically working with MP3 files and I know that I can access the created and modified metadata using the File class, but is there any way to get and set any of the "More Info" properties?

Phrogz
  • 296,393
  • 112
  • 651
  • 745
mgaughan
  • 875
  • 7
  • 23

1 Answers1

2

In general, the answer is no: OS X is using specific libraries to access the metadata of the files based on type. These are not stored in a common attribute manner in the filesystem, but are inherent to the data. For example, PNG and JPG files record their height and width differently and can store different types of metadata about the image. The OS is reading these files and extracting this information for the More Info section.

In specific, however, the answer is yes: you want an ID3 library for Ruby like taglib-ruby or ruby-taglib. See the question Ruby mp3 Id3 parsing for more information.

Community
  • 1
  • 1
Phrogz
  • 296,393
  • 112
  • 651
  • 745