武汉黑老大陈华子被抓c8813大文件怎么整理

华子c8813大文件怎么整理_华为c8813吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:35,037贴子:
华子c8813大文件怎么整理收藏
如题!谢谢大家
强者本色,从容尽释。路虎揽胜运动版SVR荣耀接战007,与邦德大演对手戏!
哎,哥又来了,自古三楼出S.B;有人说你这句话骂了自己咋办,哥笑了,哥850的马力手速,F5的速度,还能抢不到二楼。另外我要草三楼狗头,抚三楼菊花,暴三楼大奶!二楼是我的,三楼的傻叉还以为抢了哥的二楼,结果把自己骂了,爷笑了,顺便撸三楼一脸,抢2L,玩的就是心跳。顺便笑摸三楼狗头,顺便狂草二楼的老婆或者女友或者女神. 有人问了 你抢二楼的为什么还草二楼? 呵呵,我草我老婆 我女友我女神怎么了, 但是如果那个崽子抢到了二楼让我自摸, 肯定狂草他老婆他女友他女神, 我的智商你只配膜拜,哥亮了没?我是小尾巴
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或回复: 6 | 浏览: 551
| 字体: tT
在线时间273小时&最后登录&注册时间&帖子889&阅读权限50&积分5710&精华0&UID513504&
地区:皇姑区街道:塔湾昵称&宝宝生日&
| 字体大小: tT
生活用品转让
六月份入手的一个备用机器,没怎么用9.8新吧,买时1100元,现600元,机器没有任何,现在还在保,有要的联系我,
在线时间518小时&最后登录&注册时间&帖子1011&阅读权限50&积分1713&精华0&UID5899244&
地区:街道:昵称&宝宝生日&
最低多少钱,有**吗
在线时间273小时&最后登录&注册时间&帖子889&阅读权限50&积分5710&精华0&UID513504&
地区:皇姑区街道:塔湾昵称&宝宝生日&
600最低了亲,关键买真没多久
在线时间523小时&最后登录&注册时间&帖子761&阅读权限50&积分1533&精华0&UID6497284&
地区:大东区街道:昵称&宝宝生日&
在线时间273小时&最后登录&注册时间&帖子889&阅读权限50&积分5710&精华0&UID513504&
地区:皇姑区街道:塔湾昵称&宝宝生日&
在线时间518小时&最后登录&注册时间&帖子1011&阅读权限50&积分1713&精华0&UID5899244&
地区:街道:昵称&宝宝生日&
亲你加我Q呗,我想买手机
在线时间0小时&最后登录&注册时间&帖子20&阅读权限50&积分1055&精华0&UID&
地区:街道:昵称&宝宝生日&
手机还有吗?来自[]
登录妈妈圈
手机上妈网
孕妈必用 谁用谁好孕
5分钟内必有答案
随时随地记录宝宝可爱的瞬间
&&增值电信业务经营许可证:粤网安备案号:0
All Right Reserved版权所有using Susing System.Collections.Gusing System.Lusing System.Tusing System.Nusing System.IO;using System.C
namespace MvcApplication1{&&& public class FTPHelper&&& {&&&&&&& #region 成员变量
&&&&&&& /// &summary&&&&&&&& /// FTP服务器地址&&&&&&& /// &/summary&&&&&&&& private static readonly string ftpServerIP = ConfigurationManager.AppSettings["FtpServerIP"];
&&&&&&& /// &summary&&&&&&&& /// FTP服务器用户名&&&&&&& /// &/summary&&&&&&&& private static readonly string ftpUserID = ConfigurationManager.AppSettings["FtpUserName"];
&&&&&&& /// &summary&&&&&&&& /// FTP服务器用户名的密码&&&&&&& /// &/summary&&&&&&&& private static readonly string ftpPassword = ConfigurationManager.AppSettings["FtpPassword"];
&&&&&&& private static string ftpBaseUrl = @"ftp://" + ftpServerIP + "/";
&&&&&&& #endregion
&&&&&&& #region 构造方法&&&&&&& //public static FTPOperation()&&&&&&& //{&&&&&&& //}
&&&&&&& ////==============================================================&&&&&&& //// 构造函数名:FTPOperation&&&&&&& ///// &summary&&&&&&&& ///// 默认构造函数&&&&&&& ///// &/summary&&&&&&&& ///// &remarks&&&&&&&& ///// ========================================================================&&&&&&& ///// 更新履历&&&&&&& ///// 序号&&&& 修改日期&&&&&& 责任人&&&& 更新内容&&&&&&& ///// 001&&&& &&&&& 武健&&&& 新建&&&&&&& ///// ========================================================================&&&&&&& ///// &/remarks&&&&&&&& //public static FTPOperation( string filePath )&&&&&&& //{
&&&&&&& //}
&&&&&&& #endregion
&&&&&&& #region 公共方法
&&&&&&& /// 方法功能:获取文件(夹)列表&&&&&&& /// &summary&&&&&&&& /// 获取指定文件夹下面的文件列表(包括文件夹)&&&&&&& /// FTP的根目录下面的虚拟目录无法获取,&&&&&&& /// 所以建议在给FTP网站添加虚拟目录的时候在网站根目录下面添加一个和虚拟目录同名的空文件夹&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&相对路劲(例如:fold1/fold2/fold3)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static List&string& GetDetailList(string path)&&&&&&& {&&&&&&&&&&& var _returnList = new List&string&();&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(path, WebRequestMethods.Ftp.ListDirectoryDetails);&&&&&&&&&&& WebResponse response = ();&&&&&&&&&&& StreamReader reader = new StreamReader(response.GetResponseStream());&&&&&&&&&&& string line = reader.ReadLine();&&&&&&&&&&& while (line != null)&&&&&&&&&&& {&&&&&&&&&&&&&&& _returnList.Add(line);&&&&&&&&&&&&&&& line = reader.ReadLine();&&&&&&&&&&& }&&&&&&&&&&& return _returnL
&&&&&&& /// 方法功能:获取文件列表&&&&&&& /// &summary&&&&&&&& /// 获取指定文件夹下面的文件列表(不包括文件夹)&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&相对路劲(例如:fold1/fold2/fold3)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static List&string& GetFileList(string path)&&&&&&& {&&&&&&&&&&& var _returnList = new List&string&();&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(path, WebRequestMethods.Ftp.ListDirectory);&&&&&&&&&&& WebResponse response = ();&&&&&&&&&&& StreamReader reader = new StreamReader(response.GetResponseStream());&&&&&&&&&&& string line = reader.ReadLine();&&&&&&&&&&& while (line != null)&&&&&&&&&&& {&&&&&&&&&&&&&&& _returnList.Add(line);&&&&&&&&&&&&&&& line = reader.ReadLine();&&&&&&&&&&& }&&&&&&&&&&& return _returnL
&&&&&&& /// 方法功能:获取文件夹列表&&&&&&& /// &summary&&&&&&&& /// 获取指定目录下面的文件夹列表&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&相对路劲(例如:fold1/fold2/fold3)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static List&string& GetDirectorys(string path)&&&&&&& {&&&&&&&&&&& var _detailList = GetDetailList(path).Where(p =& p.Contains("&DIR&"));&&&&&&&&&&& var _returnList = new List&string&();&&&&&&&&&&& foreach (var item in _detailList)&&&&&&&&&&& {&&&&&&&&&&&&&&& _returnList.Add(item.Substring(39));&&&&&&&&&&& }&&&&&&&&&&& return _returnL&&&&&&& }
&&&&&&& /// 方法功能:判断路劲是否存在(文件夹路劲)&&&&&&& /// &summary&&&&&&&& /// 判断该路劲是否存在&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&相对路劲(例如:fold1/fold2/fold3)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static bool CheckPathExsist(string path)&&&&&&& {&&&&&&&&&&& if (string.IsNullOrEmpty(path))
&&&&&&&&&&& string[] pathArr = path.Replace('//', '/').Trim('/').Split('/');&&&&&&&&&&& string basePath = "";&&&&&&&&&&& foreach (var item in pathArr)&&&&&&&&&&& {&&&&&&&&&&&&&&& if (!GetDirectorys(basePath).Contains(item))&&&&&&&&&&&&&&& basePath += item + "/";&&&&&&&&&&& }&&&&&&&&&&&&&&&&&& }
&&&&&&& /// 方法功能:判断文件是否存在&&&&&&& /// &summary&&&&&&&& /// 判断文件是否存在&&&&&&& /// &/summary&&&&&&&& /// &param name="fullPath"&相对路劲(例如:fold1/fold2/fold3/index.flv)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static bool CheckFileExsist(string fullPath)&&&&&&& {&&&&&&&&&&& if (string.IsNullOrEmpty(fullPath))
&&&&&&&&&&& string path = "";&&&&&&&&&&& if (fullPath.Contains('/') || fullPath.Contains('//'))&&&&&&&&&&& {&&&&&&&&&&&&&&& path = Path.GetDirectoryName(fullPath).Replace('//', '/').Trim('/');&&&&&&&&&&&&&&& if (!CheckPathExsist(path))&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&& }&&&&&&&&&&& return GetFileList(path).Contains(path == "" ? fullPath : Path.GetFileName(fullPath));&&&&&&& }
&&&&&&& /// 方法功能:创建文件夹&&&&&&& /// &summary&&&&&&&& /// 创建目录(可以任意创建层次目录)&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&相对路劲(例如:fold1/fold2/fold3)&/param&&&&&&&& public static void MakeDirectory(string path)&&&&&&& {&&&&&&&&&&& if (string.IsNullOrEmpty(path))&&&&&&&&&&& string[] pathArr = path.Replace('//', '/').Trim('/').Split('/');&&&&&&&&&&& string basePath = "";&&&&&&&&&&& bool pathExsist =&&&&&&&&&&& foreach (var item in pathArr)&&&&&&&&&&& {&&&&&&&&&&&&&&& if (pathExsist)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& if (GetDirectorys(basePath).Contains(item))&&&&&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&& basePath += item + "/";&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&& basePath += item + "/";&&&&&&&&&&&&&&& pathExsist =&&&&&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(basePath, WebRequestMethods.Ftp.MakeDirectory);&&&&&&&&&&&&&&& WebResponse response = ();&&&&&&&&&&&&&&& Stream ftpStream = response.GetResponseStream();
&&&&&&&&&&&&&&& ftpStream.Close();&&&&&&&&&&&&&&& response.Close();&&&&&&&&&&& }
&&&&&&& /// 方法功能:上传文件&&&&&&& /// &summary&&&&&&&& /// 上传文件&&&&&&& /// &/summary&&&&&&&& /// &param name="localPath"&本地文件绝对路劲&/param&&&&&&&& /// &param name="fullPath"&FTP文件路劲&/param&&&&&&&& /// &param name="copy"&True:复制文件&& False:剪切文件&/param&&&&&&&& public static bool Upload(string localPath, string fullPath, bool copy)&&&&&&& {&&&&&&&&&&& try&&&&&&&&&&& {&&&&&&&&&&&&&&& var _localFileStream = File.Open(localPath, FileMode.Open);
&&&&&&&&&&&&&&& MakeDirectory(Path.GetDirectoryName(fullPath));
&&&&&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(fullPath, WebRequestMethods.Ftp.UploadFile);
&&&&&&&&&&&&&&& // 设定在请求完成之后是否关闭到 FTP 服务器的控制连接&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& // 设定FTP服务器接收文件的大小&&&&&&&&&&&&&&&
= _localFileStream.L
&&&&&&&&&&&&&&& // 设定缓存大小&&&&&&&&&&&&&&& int buffLength = 2048;&&&&&&&&&&&&&&& byte[] buff = new byte[buffLength];&&&&&&&&&&&&&&& int contentL
&&&&&&&&&&&&&&& // 检索用于向 FTP 服务器上载数据的流&&&&&&&&&&&&&&& Stream _ftpStream = ();
&&&&&&&&&&&&&&& // 每次按缓存大小读取文件流&&&&&&&&&&&&&&& contentLen = _localFileStream.Read(buff, 0, buffLength);
&&&&&&&&&&&&&&& while (contentLen != 0)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& // 将上传文件流写到FTP服务器上载数据流&&&&&&&&&&&&&&&&&&& _ftpStream.Write(buff, 0, contentLen);&&&&&&&&&&&&&&&&&&& contentLen = _localFileStream.Read(buff, 0, buffLength);&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&& // 关闭数据流&&&&&&&&&&&&&&& _ftpStream.Close();&&&&&&&&&&&&&&& _localFileStream.Close();
&&&&&&&&&&&&&&& if (!copy)&&&&&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&& File.Delete(localPath);&&&&&&&&&&&&&&& }&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&&&&&& catch&&&&&&&&&&& {&&&&&&&&&&&&&&&&&&&&&&&&&& }&&&&&&& }
&&&&&&& /// 方法功能:文件下载&&&&&&& /// &summary&&&&&&&& ///& 文件下载(暂时有些小问题)&&&&&&& ///& 利用保存到本地的临时文件中在进行删除可能比较好(以后再实现)&&&&&&& /// &/summary&&&&&&&& /// &param name="fullPath"&FTP文件路劲&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static List&byte& Download(string fullPath)&&&&&&& {
&&&&&&&&&&& var _returnList = new List&byte&();
&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(fullPath, WebRequestMethods.Ftp.DownloadFile);
&&&&&&&&&&& FtpWebResponse response = (FtpWebResponse)ftp.GetResponse();
&&&&&&&&&&& // 设定缓存大小&&&&&&&&&&& int buffLength = 2048;&&&&&&&&&&& byte[] buff = new byte[buffLength];&&&&&&&&&&& int contentL
&&&&&&&&&&& Stream _ftpStream = response.GetResponseStream();
&&&&&&&&&&& while ((contentLen = _ftpStream.Read(buff, 0, buffLength)) != 0)&&&&&&&&&&& {&&&&&&&&&&&&&&& _returnList.AddRange(buff.ToList());&&&&&&&&&&& }&&&&&&&&&&& // 关闭数据流&&&&&&&&&&& _ftpStream.Close();&&&&&&&&&&& response.Close();
&&&&&&&&&&& return _returnL
&&&&&&& /// 方法功能:获取文件大小(仅文件)&&&&&&& /// &summary&&&&&&&& /// 获取文件大小&&&&&&& /// 在调用次方法前最好确认这个文件夹是否存在&&&&&&& /// &/summary&&&&&&&& /// &param name="fullPath"&相对路劲(例如:fold1/fold2/fold3/index.flv)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static long GetFileSize(string fullPath)&&&&&&& {&&&&&&&&&&& long fileSize = 0;
&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(fullPath, WebRequestMethods.Ftp.GetFileSize);
&&&&&&&&&&& FtpWebResponse response = (FtpWebResponse)ftp.GetResponse();
&&&&&&&&&&& Stream ftpStream = response.GetResponseStream();&&&&&&&&&&& fileSize = response.ContentL
&&&&&&&&&&& ftpStream.Close();&&&&&&&&&&& response.Close();
&&&&&&&&&&& return fileS&&&&&&& }
&&&&&&& /// 方法功能:获取文件时间戳&&&&&&& /// &summary&&&&&&&& /// 获取文件时间戳&&&&&&& /// 在调用次方法前最好确认这个文件夹是否存在&&&&&&& /// &/summary&&&&&&&& /// &param name="fullPath"&相对路劲(例如:fold1/fold2/fold3/index.flv)&/param&&&&&&&& /// &returns&&/returns&&&&&&&& public static void GetDateTimeStamp(string fullPath)&&&&&&& {&&&&&&&&&&& // 暂时未实现&&&&&&& }
&&&&&&& /// 方法功能:修改文件夹名称(文件夹或者文件都可以)&&&&&&& /// &summary&&&&&&&& /// 修改文件夹名称&&&&&&& /// &/summary&&&&&&&& /// &param name="path"&"fold1/fold2"或者"fold1/index.flv"&/param&&&&&&&& /// &param name="newPathName"&&/param&&&&&&&& public static void ChangeFoldName(string path, string newPathName)&&&&&&& {
&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(path, WebRequestMethods.Ftp.Rename);
&&&&&&&&&&&
= newPathN
&&&&&&&&&&& FtpWebResponse response = (FtpWebResponse)ftp.GetResponse();&&&&&&&&&&& Stream ftpStream = response.GetResponseStream();
&&&&&&&&&&& ftpStream.Close();&&&&&&&&&&& response.Close();&&&&&&& }
&&&&&&& /// 方法功能:删除文件(仅文件)&&&&&&& /// &summary&&&&&&&& /// 删除文件&&&&&&& /// &/summary&&&&&&&& /// &param name="fullPath"&例如:"fold1/fold2/index.flv"&/param&&&&&&&& public static void Delete(string fullPath)&&&&&&& {&&&&&&&&&&& FtpWebRequest ftp = CreateFtpRequest(fullPath, WebRequestMethods.Ftp.DeleteFile);&&&&&&&&&&&
&&&&&&&&&&& string result = String.E&&&&&&&&&&& FtpWebResponse response = (FtpWebResponse)ftp.GetResponse();&&&&&&&&&&& long size = response.ContentL&&&&&&&&&&& Stream datastream = response.GetResponseStream();&&&&&&&&&&& StreamReader sr = new StreamReader(datastream);&&&&&&&&&&& result = sr.ReadToEnd();&&&&&&&&&&& sr.Close();&&&&&&&&&&& datastream.Close();&&&&&&&&&&& response.Close();&&&&&&& }&&&&&&& #endregion
&&&&&&& #region Private Method&&&&&&& private static FtpWebRequest CreateFtpRequest(string path, string method)&&&&&&& {&&&&&&&&&&& FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpBaseUrl + path ?? string.Empty));&&&&&&&&&&&
=&&&&&&&&&&&
=&&&&&&&&&&&&&&&&&& }&&&&&&& #endregion&&& }}
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:3354次
排名:千里之外}

我要回帖

更多关于 北京黑社会大哥华子 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信