/core/externals/update-engine/externals/google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.h

http://macfuse.googlecode.com/ · C++ Header · 55 lines · 10 code · 5 blank · 40 comment · 0 complexity · 7e53e54d0db3e138eb188176c14ccc71 MD5 · raw file

  1. //
  2. // GTMNSString+FindFolder.h
  3. //
  4. // Copyright 2006-2008 Google Inc.
  5. //
  6. // Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7. // use this file except in compliance with the License. You may obtain a copy
  8. // of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  14. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  15. // License for the specific language governing permissions and limitations under
  16. // the License.
  17. //
  18. #import <Foundation/Foundation.h>
  19. @interface NSString (GTMStringFindFolderAdditions)
  20. // Create a path to a folder located with FindFolder
  21. //
  22. // Args:
  23. // theFolderType: one of the folder types in Folders.h
  24. // (kPreferencesFolderType, etc)
  25. // theDomain: one of the domains in Folders.h (kLocalDomain, kUserDomain, etc)
  26. // doCreate: create the folder if it does not already exist
  27. //
  28. // Returns:
  29. // full path to folder, or nil if the folder doesn't exist or can't be created
  30. //
  31. + (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
  32. inDomain:(short)theDomain
  33. doCreate:(BOOL)doCreate;
  34. // Create a path to a folder inside a folder located with FindFolder
  35. //
  36. // Args:
  37. // theFolderType: one of the folder types in Folders.h
  38. // (kPreferencesFolderType, etc)
  39. // subfolderName: name of directory inside the Apple folder to be located or created
  40. // theDomain: one of the domains in Folders.h (kLocalDomain, kUserDomain, etc)
  41. // doCreate: create the folder if it does not already exist
  42. //
  43. // Returns:
  44. // full path to subdirectory, or nil if the folder doesn't exist or can't be created
  45. //
  46. + (NSString *)gtm_stringWithPathForFolder:(OSType)theFolderType
  47. subfolderName:(NSString *)subfolderName
  48. inDomain:(short)theDomain
  49. doCreate:(BOOL)doCreate;
  50. @end