MeVisLab Toolbox Reference
macFileMetadata.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2008, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef MAC_FILE_METADATA_H
14 #define MAC_FILE_METADATA_H
15 
17 
18 #if defined(__APPLE__)
19 
21 #include <macByteData.h>
22 #include <string>
23 
24 namespace macos {
25 
28  {
29  public:
30 
32 
34  static bool hasData(const std::string &filename, const std::string &key);
35 
37  static bool removeData(const std::string &filename, const std::string &key);
38 
40  static bool updateData(const std::string &filename, const std::string &key, const void *value, size_t size);
41 
43  static ByteDataPtr getData(const std::string &filename, const std::string &key);
44 
45  static bool hasTag(const std::string &filename, const std::string &tagname);
46 
47  static bool addTag(const std::string &filename, const std::string &tagname);
48 
49  static bool removeTag(const std::string &filename, const std::string &tagname);
50  };
51 
52 }
53 
54 #endif // __APPLE__
55 #endif // __macFileMetadata_H
File Metadata related functions (uses extended attributes)
static bool updateData(const std::string &filename, const std::string &key, const void *value, size_t size)
Associate key and value together as metadata of path. Key must be an UTF-8 string.
static bool removeData(const std::string &filename, const std::string &key)
Remove metadata identified by key associated with path. Key must be an UTF-8 string.
static bool removeTag(const std::string &filename, const std::string &tagname)
static bool hasTag(const std::string &filename, const std::string &tagname)
static bool addTag(const std::string &filename, const std::string &tagname)
static ByteDataPtr getData(const std::string &filename, const std::string &key)
Retrieve data from the metadata identified by key associated with path. Key must be an UTF-8 string.
static bool hasData(const std::string &filename, const std::string &key)
Check for metadata identified by key associated with path. Key must be an UTF-8 string.
Smart pointer to reference counted object (Helper class)
Definition: macSmartPtr.h:28
#define OSXSUPPORT_PUBLIC_API
Symbol visibility macros.
AppleScript support.