Exemple #1
0
        /// <summary>
        ///		<see cref="IFileProvider.Delete"/>
        /// </summary>
        public void Delete(string path)
        {
            var longPath = new LongPath(path);

            bool result;

            if (KtmTransaction.IsInTransaction)
            {
                result = WindowsNative.DeleteFileTransacted(longPath.PathString, KtmTransaction.Current.Hanlde);
            }
            else
            {
                result = WindowsNative.DeleteFile(longPath.PathString);
            }
            if (!result)
            {
                WindowsNative.HandleWindowsError();
            }
        }