objc2_foundation/generated/
NSHFSFileTypes.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7#[cfg(feature = "NSString")]
8#[inline]
9pub extern "C-unwind" fn NSFileTypeForHFSTypeCode(
10    hfs_file_type_code: OSType,
11) -> Option<Retained<NSString>> {
12    extern "C-unwind" {
13        fn NSFileTypeForHFSTypeCode(hfs_file_type_code: OSType) -> *mut NSString;
14    }
15    let ret = unsafe { NSFileTypeForHFSTypeCode(hfs_file_type_code) };
16    unsafe { Retained::retain_autoreleased(ret) }
17}
18
19extern "C-unwind" {
20    /// # Safety
21    ///
22    /// `file_type_string` might not allow `None`.
23    #[cfg(feature = "NSString")]
24    pub fn NSHFSTypeCodeFromFileType(file_type_string: Option<&NSString>) -> OSType;
25}
26
27/// # Safety
28///
29/// `full_file_path` might not allow `None`.
30#[cfg(feature = "NSString")]
31#[inline]
32pub unsafe extern "C-unwind" fn NSHFSTypeOfFile(
33    full_file_path: Option<&NSString>,
34) -> Option<Retained<NSString>> {
35    extern "C-unwind" {
36        fn NSHFSTypeOfFile(full_file_path: Option<&NSString>) -> *mut NSString;
37    }
38    let ret = unsafe { NSHFSTypeOfFile(full_file_path) };
39    unsafe { Retained::retain_autoreleased(ret) }
40}