Exemple #1
0
        /// <summary>
        /// 创建一个新参数
        /// </summary>
        /// <returns></returns>
        public static TraverseEventArg Create(FolderFileInfo data)
        {
            var e = new TraverseEventArg();

            e.Data = data;
            return(e);
        }
Exemple #2
0
        ///<summary>
        ///
        /// </summary>
        public static FolderFileInfo GetInst(string fileOrFolderPath)
        {
            FolderFileInfo item = new FolderFileInfo();

            item.fileInfo      = (File.Exists(fileOrFolderPath)) ? new FileInfo(fileOrFolderPath) : null;
            item.directoryInfo = (Directory.Exists(fileOrFolderPath)) ? new DirectoryInfo(fileOrFolderPath) : null;
            return(item);
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        public FolderFileInfo GetFileInfo(string filePath)
        {
            FolderFileInfo item = new FolderFileInfo();

            if (StringChecker.IsPhysicalPath(filePath))
            {
                item = FolderFileInfo.GetInst(filePath);
            }

            return(item);
        }
Exemple #4
0
        /// <summary>
        ///  获取一个文件夹的基本信息
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public FolderFileInfo GetFolderInfo(string path)
        {
            var folderInfo = FolderFileInfo.GetInst(path);

            return(folderInfo);
        }