objc2-foundation 0.3.2

Bindings to the Foundation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

#[cfg(feature = "NSString")]
#[inline]
pub extern "C-unwind" fn NSFileTypeForHFSTypeCode(
    hfs_file_type_code: OSType,
) -> Option<Retained<NSString>> {
    extern "C-unwind" {
        fn NSFileTypeForHFSTypeCode(hfs_file_type_code: OSType) -> *mut NSString;
    }
    let ret = unsafe { NSFileTypeForHFSTypeCode(hfs_file_type_code) };
    unsafe { Retained::retain_autoreleased(ret) }
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `file_type_string` might not allow `None`.
    #[cfg(feature = "NSString")]
    pub fn NSHFSTypeCodeFromFileType(file_type_string: Option<&NSString>) -> OSType;
}

/// # Safety
///
/// `full_file_path` might not allow `None`.
#[cfg(feature = "NSString")]
#[inline]
pub unsafe extern "C-unwind" fn NSHFSTypeOfFile(
    full_file_path: Option<&NSString>,
) -> Option<Retained<NSString>> {
    extern "C-unwind" {
        fn NSHFSTypeOfFile(full_file_path: Option<&NSString>) -> *mut NSString;
    }
    let ret = unsafe { NSHFSTypeOfFile(full_file_path) };
    unsafe { Retained::retain_autoreleased(ret) }
}