Kimono.KMimeType.FindByPath C# (CSharp) Метод

FindByPath() публичный статический Метод

Finds a KMimeType with the given url. This function looks at mode_t first. If that does not help it looks at the extension. This is fine for FTP, FILE, TAR and friends, but is not for HTTP ( cgi scripts! ). You should use KRun instead, but this function returns immediately while KRun is async. If no extension matches, then the file contents will be examined if the URL is a local file, or "application/octet-stream" is returned otherwise. Equivalent to
 KUrl u; u.setPath(path); return findByUrl( u, mode, true, fast_mode ); 
name="path" the path to the file name="mode" the mode of the file (used, for example, to identify executables) name="fast_mode" If set to true no disk access is allowed to find out the mimetype. The result may be suboptimal, but it is fast. name="accuracy" If not a null pointer, accuracy is set to the accuracy of the match (which is in the range 0..100)
public static FindByPath ( string path, long mode, bool fast_mode, int &accuracy ) : KMimeType
path string
mode long
fast_mode bool
accuracy int
Результат KMimeType
        public static KMimeType FindByPath(string path, long mode, bool fast_mode, ref int accuracy)
        {
            StackItem[] stack = new StackItem[5];
            #if DEBUG
            stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(path);
            #else
            stack[1].s_class = (IntPtr) GCHandle.Alloc(path);
            #endif
            stack[2].s_long = mode;
            stack[3].s_bool = fast_mode;
            stack[4].s_int = accuracy;
            staticInterceptor.Invoke("findByPath$$$$", "findByPath(const QString&, mode_t, bool, int*)", stack);
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[1].s_class);
            #else
            ((GCHandle) stack[1].s_class).Free();
            #endif
            accuracy = stack[4].s_int;
            object returnValue = ((GCHandle) stack[0].s_class).Target;
            #if DEBUG
            DebugGCHandle.Free((GCHandle) stack[0].s_class);
            #else
            ((GCHandle) stack[0].s_class).Free();
            #endif
            return (KMimeType) returnValue;
        }

Same methods

KMimeType::FindByPath ( string path ) : KMimeType
KMimeType::FindByPath ( string path, long mode ) : KMimeType
KMimeType::FindByPath ( string path, long mode, bool fast_mode ) : KMimeType