1 /* 2 * Copyright 2020, Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _AUTO_DELETER_POSIX_H 6 #define _AUTO_DELETER_POSIX_H 7 8 9 #include <AutoDeleter.h> 10 #include <stdio.h> 11 #include <dirent.h> 12 #include <fs_attr.h> 13 14 15 namespace BPrivate { 16 17 18 typedef CObjectDeleter<FILE, int, fclose> FileCloser; 19 typedef CObjectDeleter<DIR, int, closedir> DirCloser; 20 typedef CObjectDeleter<DIR, int, fs_close_attr_dir> AttrDirCloser; 21 22 23 } 24 25 26 using ::BPrivate::FileCloser; 27 using ::BPrivate::DirCloser; 28 using ::BPrivate::AttrDirCloser; 29 30 31 #endif // _AUTO_DELETER_POSIX_H 32