Example #1
0
        /// <summary>
        ///     Returns file info for the given index when iterating over files.
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        /// <exception cref="ResultException"></exception>
        public FileStat StatAt(int index)
        {
            FileStat ret = new FileStat();
            Result   res = Methods.StatAt(methodsPtr, index, ref ret);

            if (res != Result.Ok)
            {
                throw new ResultException(res);
            }
            return(ret);
        }
Example #2
0
        /// <summary>
        ///     Returns file info for the given key name.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        /// <exception cref="ResultException"></exception>
        public FileStat Stat(string name)
        {
            FileStat ret = new FileStat();
            Result   res = Methods.Stat(methodsPtr, name, ref ret);

            if (res != Result.Ok)
            {
                throw new ResultException(res);
            }
            return(ret);
        }