首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏不做码农的开发者

    C# 基础知识系列- 14 IO篇 文件的操作 (2)

    public System.IO.FileInfo[] GetFiles (); public System.IO.FileInfo[] GetFiles (string searchPattern); ); public System.IO.FileInfo[] GetFiles (string searchPattern, System.IO.SearchOption searchOption); 嗯,依旧类似的写法,获取文件信息的数组 public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (); public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (string searchPattern ); public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (string searchPattern

    69210发布于 2020-05-14
  • 来自专栏css小迷妹

    C#分页显示服务器上指定目录下的所有图片代码

    0) pageIndex = 1; System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(Server.MapPath(folder)); System.IO.FileInfo Math.Ceiling((decimal)fs.Length / (decimal)pageItem); } if (pageIndex > TotalPages) pageIndex = TotalPages; System.IO.FileInfo [] fs2 = new System.IO.FileInfo[pageItem]; int leftCount = pageItem; if (fs.Length - ((pageIndex - 1)

    1.8K20发布于 2021-11-02
  • 来自专栏葡萄城控件技术团队

    ActiveReports 报表应用教程 (16)---报表导出

    GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo

    2.9K51发布于 2018-01-10
  • 来自专栏不做码农的开发者

    C# 基础知识系列- 14 IO篇 文件的操作(2)

    public System.IO.FileInfo[] GetFiles (); public System.IO.FileInfo[] GetFiles (string searchPattern); ); public System.IO.FileInfo[] GetFiles (string searchPattern, System.IO.SearchOption searchOption); 嗯,依旧类似的写法,获取文件信息的数组 public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (); public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (string searchPattern ); public System.Collections.Generic.IEnumerable<System.IO.FileInfo> EnumerateFiles (string searchPattern

    82800发布于 2020-05-12
  • 来自专栏CSharp编程大全

    C# WPF:把文件给我拖进来!!!

    } ImageSource imageSource = SystemIcon.GetImageSource(true, menuItem.FilePath); System.IO.FileInfo file = new System.IO.FileInfo(fileName); if (string.IsNullOrWhiteSpace(file.Extension))

    2.9K20发布于 2020-12-29
  • 来自专栏听雨堂

    【5】基于Log4Net的日志系统

    \\log4net.config")); 2、Web应用程序,也可以通过调用初始化语句完成: log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo object sender, EventArgs e) { // 在应用程序启动时运行的代码 log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo public static void Init(string ConfigFile) { log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo static void WinFormInit() //WinForm程序的初始化 { log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo public static void WebInit() //WinForm程序的初始化 { log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo

    2.1K60发布于 2018-01-23
  • 来自专栏DOTNET

    log4net使用注意事项

    Log4net.config"); ICollection c = log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo log4net> </configuration> Main函数中: ICollection c = log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo ICollection c = log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(path)); 这行代码返回值是

    1.7K120发布于 2018-03-08
  • 来自专栏独立观察员博客

    C# WPF:把文件给我拖进来!!!

    } ImageSource imageSource = SystemIcon.GetImageSource(true, menuItem.FilePath); System.IO.FileInfo file = new System.IO.FileInfo(fileName); if (string.IsNullOrWhiteSpace(file.Extension))

    98310编辑于 2022-12-06
  • 来自专栏css小迷妹

    asp.net下载文件几种方式

    string fileName = "aaa.zip";//客户端保存的文件名 string filePath = Server.MapPath("DownLoad/aaa.zip");//路径 System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); if (fileInfo.Exists == true) { const long ChunkSize =

    2.3K20发布于 2021-11-02
  • 来自专栏码客

    WPF开发-常用的路径及文件夹、文件操作

    Console.ReadKey(); } static void WalkDirectoryTree(System.IO.DirectoryInfo root) { System.IO.FileInfo = null) { foreach (System.IO.FileInfo fi in files) { System.IO.FileInfo fi = new System.IO.FileInfo(file); Console.WriteLine("{0}: {1} System.IO.FileInfo fi = new System.IO.FileInfo(@"C:\Users\Public\DeleteTest\test2.txt"); try

    2.6K10发布于 2021-10-18
  • 来自专栏Java架构师必看

    在ASP.NET中获取文件属性

    按照惯例,我们先看代码: fileinfo.aspx <%@ Page Language="c#" %> <script runat="server"> protected System.IO.FileInfo IsPostBack){ // 取得文件路径 filename = Request.ServerVariables["PATH_TRANSLATED"]; // 创建objFI对象 objFI = new System.IO.FileInfo

    4.1K40发布于 2021-03-22
  • 来自专栏全栈程序员必看

    Log4net用法

    ConfigurationManager.AppSettings["log4net"]; var fi = new System.IO.FileInfo ConfigurationManager.AppSettings["log4net"]; var fi = new System.IO.FileInfo

    74720编辑于 2022-09-07
  • 来自专栏angularejs学习篇

    ajax+ashx:实现文件的批量导出

    ms-download"; string s_path = HttpContext.Current.Server.MapPath(s_fileName); System.IO.FileInfo file = new System.IO.FileInfo(s_path); HttpContext.Current.Response.Clear();

    1.2K20发布于 2018-12-26
  • 来自专栏全栈程序员必看

    ASP.netMVC文件下载

    string fileName = “”;//客户端保存的文件名 4 string filePath = Server.MapPath(“”);//路径 5 System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); 7 if (fileInfo.Exists == true) 8 { 9

    1.1K10编辑于 2022-09-18
  • 来自专栏听雨堂

    Log4Net使用心得

    的配置方法   1.添加global.ascx,在Application_Start中添加     log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo

    911100发布于 2018-01-23
  • 来自专栏大内老A

    .NET Core的文件系统[3]:由PhysicalFileProvider构建的物理文件系统

    一个物理文件可以通过一个System.IO.FileInfo对象来表示,一个PhysicalFileInfo对象实际上就是对这个一个FileInfo对象的封装,定义在PhysicalFileInfo的所有属性都来源于这个 既然PhysicalFileInfo是对一个System.IO.FileInfo对象的封装,那么我们应该想得到PhysicalDirectoryInfo封装的自然就是表示目录的DirectoryInfo 首先,该文件系统下用于描述目录和文件的分别是一个PhysicalDirectoryInfo和PhysicalFileInfo对象,它们分别是对一个DirectoryInfo和FileInfo(System.IO.FileInfo

    1.4K90发布于 2018-01-15
  • 来自专栏Java架构师必看

    把图片插入excel表格并按分类生成sheets

        workbooks=null;     application=null;     string path=Server.MapPath("Excel//Out1.xls");     System.IO.FileInfo  file = new System.IO.FileInfo(path);      Response.Clear();      Response.Charset="GB2312";      

    1.2K20发布于 2021-03-22
  • 来自专栏c#Winform自定义控件系列

    RDLC(Reportview)报表直接打印,支持所有浏览器,客户可在linux下浏览使用

    } public void DownloadFile(string path, string name) { try { System.IO.FileInfo file = new System.IO.FileInfo(path); Response.Clear(); Response.Charset = "utf

    2.5K30发布于 2019-09-11
  • 来自专栏大内老A

    [ASP.NET Core 3框架揭秘] 文件系统[3]:物理文件系统

    一个物理文件可以通过一个System.IO.FileInfo对象来表示,一个PhysicalFileInfo对象实际上就是对该对象的封装,定义在PhysicalFileInfo的所有属性都来源于这个FileInfo 首先,该文件系统使用PhysicalDirectoryInfo和PhysicalFileInfo对类型来描述目录和文件,它们分别是对DirectoryInfo和FileInfo(System.IO.FileInfo

    2K50发布于 2019-11-24
  • 来自专栏全栈程序员必看

    asp.net里导出excel表方法汇总

    = null; GC.Collect(); string path = Server.MapPath(this.xlfile.Text+”.xls”); System.IO.FileInfo file = new System.IO.FileInfo(path); Response.Clear(); Response.Charset=”GB2312″; Response.ContentEncoding

    1.1K10编辑于 2022-06-30
领券