README.rdoc in spotlight-0.0.2 vs README.rdoc in spotlight-0.0.3
- old
+ new
@@ -7,17 +7,26 @@
require 'spotlight'
=== Finds files matching a given query
query = Spotlight::Query.new('kMDItemKind = "JPEG image" && kMDItemPixelHeight > 2000')
+ query.scopes << '/Users/youpy/'
query.execute.map {|item|
puts item.get(:kMDItemPath)
}
-=== Gets the metadata attributes for the specified file
+=== Creates query from .savedSearch
+ query = Spotlight::Query.from_saved_search('foo.savedSearch')
+
+=== Gets the metadata attribute for the specified file
+
item = Spotlight::Item.new('/Users/youpy/foo')
item.get(:kMDItemKind)
+
+=== Gets the metadata attribute names for the specified file
+
+ item.attribute_names
== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.