FCKeditor.Net_2.2/Util.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: Util.cs
* Useful tools.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
using System ;
using System.Runtime.InteropServices ;
using System.IO ;
using System.Collections ;
namespace FredCK.FCKeditorV2
{
public sealed class Util
{
// The "_mkdir" function is used by the "CreateDirectory" method.
[DllImport("msvcrt.dll", SetLastError=true)]
private static extern int _mkdir(string path) ;
private Util()
{}
/// <summary>
/// This method should provide safe substitude for Directory.CreateDirectory().
/// </summary>
/// <param name="path">The directory path to be created.</param>
/// <returns>A <see cref="System.IO.DirectoryInfo"/> object for the created directory.</returns>
/// <remarks>
/// <para>
/// This method creates all the directory structure if needed.
/// </para>
/// <para>
/// The System.IO.Directory.CreateDirectory() method has a bug that gives an
/// error when trying to create a directory and the user has no rights defined
/// in one of its parent directories. The CreateDirectory() should be a good
/// replacement to solve this problem.
/// </para>
/// </remarks>
public static DirectoryInfo CreateDirectory( string path )
{
ArrayList oDirsToCreate = new ArrayList() ;
// Create the directory info object for that dir (normalized to its absolute representation).
DirectoryInfo oDir = new DirectoryInfo( Path.GetFullPath( path ) ) ;
// Check the entire path structure to find directories that must be created.
while ( oDir != null && !oDir.Exists )
后面还有 23 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
