|
计算机系统的重要作用之一是能快速处理大量信息,因此数据的组织和存取成为一个极为重要的内容。文件是信息的一种组织形式,而文件系统的的目标就是提高存储器的利用率,接受用户的委托实施对文件的操作。 文件系统是操作系统的一个重要组成部分。文件系统所要解决的问题包括:管理存储设置,决定文件的存放位置和方式,提供共享能力,保证文件安全性,提供友好的用户接口。通过文件系统,用户和应用程序能方便地进行数据存储,而不必关心底层存储设备的实现。 Windows支持多种文件系统,如FAT,FAT32,NTFS等。这些文件系统在操作系统内部有不同的实现方式,然而它们提供给用户的接口是一致的。如果应用程序不涉及到操作系统的具体特性,那么只要按照标准式来编写代码,生成的应用程序就可以运行在各个文件系统上,甚至还可以不经改动移植到其他操作系统(比如Unix和Linux)上.NET框架中的IO处理部分就封装了文件系统的实现细节,提供给开发人员一个标准化的接口。 Windows操作系统对文件系统采用多级目录结构,并且提供了一组命令用于文件和目录管理。可以使用.NET提供的标准方法进行目录管理、文件控制和文件存取等工作,程序代友编译执行时,.NET框架会自动调用相关的系统命令。 C#将文件视为一个字节序列,以流的方式对文件进行操作。流是字节序列的制作概念,文件、输入/输出设计、内部时行程序管道以及TCP/IP套接字等都可以视为一个流。.NET对流的概念进行了抽象,为这些不同类型的输入和输出提供了统一的视图,使程序员不必去了解操作系统和基础设备的具体细节。 二、目录和文件 1. 相关枚举类型 a) FileAccess,该枚举类型表示文件的访问权限,可以为以下值。 i. Read---对文件拥有读权限 ii. ReadWrite---对文件拥有的读写权限 iii. Write---对文件拥有写权限 b) FileAttributes,该枚举类型表示文件的类型 i. Archive---存档文件 ii. Compressed---压缩文件 iii. Device---设备文件 iv. Directory---目录 v. Encrypted---加密文件 vi. Hidden---隐藏文件 vii. Normal---普通文件 viii. NOtContentIndexd---无索引文件 ix. Offline---脱机文件 x. ReadOnly---只读文件 xi. ReparsePoint---重分析文件 xii. SparseFile---稀疏文件 xiii. System---系统文件 xiv. Temporary---临时文件 枚举值可以按位进行组合使用,比如FileAttributes.System|FileAttributes.ReadOnly表示系统只读文件。当然,一些相互排斥的类型是不能进行组合的,比如一个文件不能既是普通文件,又是隐藏文件。 c) FileMode,该枚举类型表示文件的打开方式,可以为以下值: i. Append---以追加的方式打开文件,如果文件存在则移动到文件末尾,否则创建一个新文件。 ii. Create---创建并打开一个文件,如果文件已经存在则覆盖旧文件。 iii. Open---打开现有文件,如果文件不存在发生异常。 iv. OpenOrCreate---打开或新建一个文件,如果文件存在则打开它,否则创建并打开一个新文件。 v. Truncate---打开现有文件,并清空文件内容。 d) FileShare,该枚举类型表示文件共享方式,可以为以下值。 i. None---禁止任何形式的共享。
iii. ReadWrite---读写共享,打开文件后允许其它进程对文件进行读和写操作。 iv. Write---写共享,打开文件后允许其它进程对文件进行写操作。 e) SeekOrigin,该枚举类型表示文件的偏移以什么为准,可以为以下值: i. Begin---从文件起始位置计。 ii. Current---从文件流的当前位置计。 iii. End---从文件流的末尾位置计。 f) NotifyFilters,该枚举类型用于指定对文件或目录哪些属性的修改进行监视,可以为以下值: i. Attributes---对属性的变化进行监视。 ii. CreationTime---对创建时间的变化进行监视。 iii. DirectoryName---对目录名称的变化进行监视。 iv. FileName---对文件名称的变化进行监视。 v. LastAccess---对最后一次访问时间的变化进行监视。 vi. LastWrite---对最后一次时间的变化进行监视。 vii. Security---对安全设置的变化进行监视。 viii. Size---对大小的变化进行监视。 2. 目录 使用Directory类提供的目录管理功能,不仅可以创建、移动和删除目录,还可以获取和设置目录的相关信息。 Directory提供的静态方法有: ? Public static DirectoryInfo CreateDirectory(string)---给定路径名,创建目录,并返回目录信息。 ? Public static void Delete(string)---给定路径名,删除目录。 ? Public static void bool Exists(string)----给定路径名,判断目录是否存在。 ? Public static DateTime GetCreationTime(string)----给定路径名,获取目录创建的日期和时间。 ? Public static string GetCurrentDirectory()---获取应用程序的当前工作目录。 ? Public static string[] GetDirectory(string)---给定路径名,获取目录中的子目录列表。 ? Public static string GetDirectoryRoot(string)---给定路径名,获取目录的卷信息或要信息。 ? Public static string[] GetFile(string)---给定路径名,获取目录中的文件列表。 ? Public static string[] GetFileSystemEntries(string)---给定路径名,获取目录中的子目录和文件列表。 ? Public static DateTime GetLastAccessTime(string)---给定路径名,获取文件最近一次访问的日期和时间。 ? Public static DateTime GetlastWriteTime(string)---给定路径名,获得目录最近一次修改的日期和时间。 ? Public static string[] GetLogicalDrivers()---获得计算机上的逻辑驱动器列表。 ? Public static DirectoryInfo GetParent(string)---给定路径名,获取目录上层目录的信息。 ? Public static void Move(string,string)---给定源路径名和目标路径名,移动目录。 ? Public static void SetCreationTime(str ing,DateTime)---给定路径名,设置目录创建的日期和时间。 ? Public static void SetCreationDirectory(string)---给定路径名,将目录设置为应用程序的当前工作目录。 ? Public static void SetLastAccessTime(string,DateTime)---给定路径名,设置目录最近一次被访问的日期和时间。 ? Public static void SetLastWriteTime(string,DateTime)---给定路径名,设置目录最近一次被修改的日期和时间。
a) 文件基本操作 ? Public static FileStream Create(string)---给定文件路径名,创建文件,并返回一个FileStream流对象。 ? Public static StreamWriter CreateText(string)---给定文件路径名,以文本的方式创建文件,并返回一个StreamWriter流对象。 ? Public static void Copy(string,string)---给定源路径名和目录路径名,考贝文件。 ? Public static void Move(string,string)---给定源路径名和目录路径名,移支文件。 ? Public static void Delete(string)---给定源路径名和目录路径名,删除文件。 ? Public static void Exists(string)---给定源路径名和目录路径名,判断文件是否存在。
? Public static FileAttributes GetAttributes(string)------给定源路径名,获取文件的属性集。 ? Public static DateTime GetCreationTime(string)---给定文件路径名,获取文件创建宾日期和时间。 ? Public static DateTime GetLastAccessTime(string)---给定文件路径名,获得文件最近一次被访问的日期和时间。 ? Public static DateTime GetLastWriteTime(string)---给定文件路径名,获得文件最近一次被修改的日期和时间。 ? Public static void SetAttributes(string,FileAttributes)---给定文件路径名,设置文件属性集。 ? Public static void SetCreationTime(string,DateTime)---给定文件路径名,设置文件创建的日期和时间。 ? Public static void SetLastAccessTime(string,DateTime)----给定文件路径名,设置文件最近一次被访问的日期和时间。 ? Public static void SetLastWriteTime(string,DateTime)---给定文件路径名,设置文件最后一次被修改的日期和时间。
? Public static FileStream Open(string,FileMode)---给定文件路径名,按指定的方式打开文件,并返回一个FileStream流对象。 ? Public static FileStream OpenRead(string)---给定文件路径名,以只读方式打开文件,并返回一个FileStream流对象。 ? Public static FileStream OpenWrite(string)---给定文件路径名,打开文件进行读写操作,并返回一个FileStream流对象。 ? Public static StreamReader OpenText(string)---给定文件路径名,以文本方式打开文件并返回一个FileStream流对象。 |
相关推荐
C# 对象序列化:将对象转换为字节流
本文介绍了C#中的对象序列化基本概念,并提供了一个简单的示例来演示如何进行对象的序列化和反序列化。通过掌握对象序列化的知识,我们可以更好地处理对象的持久化和跨应用程序域的通信需求。对象序列化是将对象转换为字节流的过程,以便可以将其存储在文件中、在网络上传输或在应用程序域之间传递。序列化的过程将对象的状态信息转换为二进制格式,以便在需要时可以重新创建对象的副本。在C#中,对象序列化是通过.NET Framework中的序列化机制来实现的。在进行对象序列化时,应该确保所操作的对象及其关联对象都是可序列化的。
C#文件下载(返回文件流)
C#下载文件(返回文件流)
C#Winform文件流FileStream实例讲解
正确使用异步 I/O 可以使应用程序的速度加快 10 倍,但是如果在没有为异步 I/O 重新设计应用程序的情况下使用异步 I/O,则可能使性能降低 10 倍。4 FileStream是一个较底层的类,只能简单地读文件到而缓冲区,而Stream类封装了一些高级的方法,如按行读取ReadLine()。FileStream类读取、写入、打开和关闭文件系统上的文件,并操作其他与文件相关的操作系统句柄,包括管道、标准输入和标准输出。5 FileStream类主要使用于大文件读写,Stream类主要用于小文件的读写。
C#下载指定url到本地临时文件,返回对应文件流
C#下载指定url的Excel到本地临时文件,通过流获取Excel内容
C# 文件流/文本流的使用及常见操作
这样,我们就可以使用C#的文件流和文本流来进行文件的读写操作了。请注意,在使用完毕后,关闭流对象是一个良好的编程习惯,以确保资源得到正确释放。文件流和文本流是在C#中进行文件读写操作的重要工具。它们能够以字节或字符为单位读写文件,并提供了许多方便的方法来处理文件。以上就是使用C#文件流和文本流进行文档操作的基本介绍,希望能对你的工作或学习有所帮助。文本流是建立在文件流之上的更高级的抽象,用于以字符形式读写文件。C# 文件流/文本流的使用及常见操作。
深入理解C#中文件流的操作与应用
本文深入探讨了在C#中使用Microsoft® Visual Studio® 2010进行文件对话框操作以及文件流的读写技术。详细介绍了如何使用FileStream、BinaryReader和BinaryWriter等类来处理文件数据,同时强调了流式数据处理的优势和重要性。
C#文件流相关操作
using System;using System.IO;namespace C_sharp文件流操作{ class Program { /// <summary> /// 1.创建文件流 /// 2.创建读/写器 /// 3.执行读/写操作 /// 4.关闭读写器 /// 5.关闭文件流 ...
Xilinx Vivado vitis IDE launch Failed \ Web installer client Obsolete 怎么办
Xilinx vitis_IDE failed Web installer client Obsolete
C#文件流操作技巧
string[] pas= Directory.GetFiles("C:\\Users\\10229\\source\\repos\\第十九天\\02Directoy文件夹操作对象\\bin\\Debug");//3\C:\Users\10229\source\repos\第十九天\02Directoy文件夹操作对象\bin\Debug。while (buff.Read(arr,0,arr.Length)>0)//如果数据没读完 继续读。
数学建模美赛O奖论文研读启示录——从模仿开始
数学建模美赛O奖论文哪些地方比较出彩?我们可以从中学到什么东西?可以从哪些地方进行模仿?我总结了一些O奖论文里我认为比较好的地方,跟大家一起学习交流!
C51单片机驱动ILI9341彩屏实战:从Proteus仿真到绘制自定义图案(附完整代码)
本文详细介绍了使用C51单片机驱动ILI9341彩屏的完整实战流程。内容涵盖硬件连接、8080并行接口时序模拟、寄存器初始化、屏幕方向设置以及基本图形绘制原理,并重点讲解了如何在Proteus仿真环境中搭建电路、调试代码,最终实现自定义图案的显示。文章提供了完整的代码示例,为嵌入式开发学习者和复古硬件爱好者提供了一套可行的解决方案。
C# 中 FileStream 文件流操作轻松上手
FileStream类是C#中用于处理文件输入输出的核心类,它位于System.IO命名空间。该类提供了一种高效、灵活的方式来读取和写入文件,能够以字节流的形式操作文件,从而实现对文件的各种操作需求。读取文件:通过FileStream可以逐字节读取文件内容,例如读取文本文件时,可以将字节流转换为字符串,进而实现对文本内容的处理。对于二进制文件,如图片、音频等,FileStream能够直接读取其字节数据,以便进行后续的处理或分析。写入文件:可以将字节数据写入文件,无论是创建新文件还是向现有文件追加内容。
Openwork 入门指南:开源 AI 桌面助手快速上手
Openwork是一款开源的AI桌面代理工具,提供类似Claude Cowork的免费替代方案。它支持本地运行,确保隐私安全,并能高效处理文件整理、文档读写等任务。支持多种AI模型,通过MIT许可完全免费。安装简单,仅需运行命令行或下载桌面版,需配置API Key后即可使用。操作直观,支持多步骤规划和权限控制,适合自动化重复工作。目前主要支持macOS,未来将扩展至Windows/Linux。建议从简单任务入手,逐步掌握这一高效的数字助手工具。
从零构建虚幻引擎体积云:参数调优与性能平衡的艺术
本文深入探讨了在虚幻引擎中构建逼真体积云系统的关键技术,包括Sky Atmosphere、Volumetric Cloud和Exponential Height Fog三大核心组件的协同工作。重点解析了体积云材质的高级控制、光照阴影的物理模拟以及性能优化策略,帮助开发者在视觉效果与性能之间找到最佳平衡点。
【python股票价格预测】基于LSTM(长短期记忆网络)的股票价格预测(附python代码)
【python股票价格预测】基于LSTM(长短期记忆网络)的股票价格预测(附python代码)
C# 文件流/文本流 文档操作
C#中的文件流和文本流 最近项目需要用到C# 做客户端 需要用到的C#方法备忘 文本流 文本流用于文本的读写。要谈文本,首先要了解的是文本编码。在网络编程中,常用的是ASCII,UTF8和BigEndianUnicode码。 其中ASCII码最常见。几乎所有的协议都支持ASCII码。SMTP和POP3协议使用UTF8编码,但也支持ASCII码。 1、向文件写入文本流 string strs=“sss”; StreamWriter stream=null; stream=new StreamWriter
高效批量转换Java接口为MCP服务:降低重复劳动的实战指南
高效批量转换Java接口为MCP服务:降低重复劳动的实战指南
C# 文件流操作 之 删除、复制、转移多个文件
string[] format = { "*.jpg", "*.doc", "*.exe", "*.pdf", "*.xls" }; C# 文件流操作 之 删除、复制、转移多个文件 /// /// 删除文件夹下面所有图片 /// /// 待删除文件路径 /// 删除到的新目录 /// 操作文件的格
AIGC算法工程师-面试八股文-2025年版本-算法八股文/工程八股文/开放式问题
两年前整理了《AIGC算法工程师 面试八股文》,全网一共有100w读者看过,收到了很多小伙伴的催更。Diffusion的技术发展非常快,博主特意整理了最近两年最新的八股文,内容非常全面,涵盖算法八股文/工程八股文/开放式问题三个大类,希望能为求职的读者们带来帮助。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
c#文件流操作
一个文件流操作简单的demo //写入文件 private void button1_Click(object sender, EventArgs e) { //(创建文件)创建文件流 FileStream fs = new FileStream("F:\\myfile\\myfile.txt", Fil...
锂电池充电器电路设计 里面有电路
锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。
C# 操作文件夹、文件流
目录操作 string[] drives = Directory.GetLogicalDrives();//本地驱动器的名,如:C:\等 string path = Directory.GetCurrentDirectory();//获取应用程序的当前工作目录 Path.GetFileName(@"c:\dir\file.txt");//获取子目录的名字,res...
全球国家地区城市数据
MySQL全球国家地区城市数据报。。。。。。。。。。。。
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
C#(二十) —— 文件流操作
文件流操作的基本步骤包括: 文件流对象 此时在参数里要展示待操作文件的位置、操作类型(即是读还是取等等) 相对应的读取器对象或者写入器对象 参数是刚刚的文件流对象 进行写入或者读取 读取器或者写入器关闭 文件流关闭 例子: 写入 FileStream fileStream = new FileStream("I:\\CSharpStudy\\WfStudy\\WfDemo\\test.txt", FileMode.Create); StreamWriter strea
C#学习第十天 文件操作、文件流
一、Path类 Path类是静态类,在命名空间IO中,专门用来处理路径一类的;Path能实现的功能,字符串也能实现,只是Path提供方便简洁的方法: Console.WriteLine(Path.GetFileName(str)); //快速获得文件名 Console.WriteLine(Path.GetFileNameWithoutExtension(str)); //快速获得不
421




被折叠的 条评论
为什么被折叠?



