public static AfcError afc_get_file_info(AfcClientHandle client, string filename, out System.Collections.ObjectModel.ReadOnlyCollection <string> fileInformation) { System.Runtime.InteropServices.ICustomMarshaler fileInformationMarshaler = AfcDictionaryMarshaler.GetInstance(null); System.IntPtr fileInformationNative = System.IntPtr.Zero; AfcError returnValue = AfcNativeMethods.afc_get_file_info(client, filename, out fileInformationNative); fileInformation = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)fileInformationMarshaler.MarshalNativeToManaged(fileInformationNative)); fileInformationMarshaler.CleanUpNativeData(fileInformationNative); return(returnValue); }
/// <summary> /// Gets information about a specific file. /// </summary> /// <param name="client"> /// The client to use to get the information of the file. /// </param> /// <param name="filename"> /// The fully-qualified path to the file. /// </param> /// <param name="file_information"> /// Pointer to a buffer that will be filled with a /// NULL-terminated list of strings with the file information. Set to NULL /// before calling this function. Free with afc_dictionary_free(). /// </param> /// <returns> /// AFC_E_SUCCESS on success or an AFC_E_* error value. /// </returns> public virtual AfcError afc_get_file_info(AfcClientHandle client, string filename, out System.Collections.ObjectModel.ReadOnlyCollection <string> fileInformation) { return(AfcNativeMethods.afc_get_file_info(client, filename, out fileInformation)); }