Ejemplo n.º 1
0
        public static FmStatResponse Stat(this MiraConnection p_Connection, string p_Path)
        {
            if (p_Connection == null)
            {
                return(null);
            }

            if (string.IsNullOrWhiteSpace(p_Path))
            {
                return(null);
            }

            var s_Handle = p_Connection.Open(p_Path, (int)OpenOnlyFlags.O_RDONLY, 0777);

            if (s_Handle < 0)
            {
                return(null);
            }

            var s_Stat = p_Connection.Stat(s_Handle);

            p_Connection.Close(s_Handle);

            return(s_Stat);
        }