//创建只读 System.IO.FileStream。 public System.IO.FileStream OpenRead() //创建使用 UTF8 编码、从现有文本文件中进行读取的 System.IO.StreamReader。 public System.IO.StreamReader OpenText()
//创建只写 System.IO.FileStream。 public System.IO.FileStream OpenWrite()
//创建一个 System.IO.StreamWriter,它向 System.IO.FileInfo 的此实例表示的文件追加文本。 public System.IO.StreamWriter AppendText()
//在指定的模式中打开文件。 public System.IO.FileStream Open(System.IO.FileMode mode) //用读、写或读/写访问权限在指定模式下打开文件。 public System.IO.FileStream Open(System.IO.FileMode mode, System.IO.FileAccess access) //用读、写或读/写访问权限和指定的共享选项在指定的模式中打开文件。 public System.IO.FileStream Open(System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share)
//将现有文件复制到新文件,不允许覆盖现有文件。 public System.IO.FileInfo CopyTo(string destFileName) //将现有文件复制到新文件,允许覆盖现有文件。 public System.IO.FileInfo CopyTo(string destFileName, bool overwrite) //将指定文件移到新位置,并提供指定新文件名的选项。 public void MoveTo(string destFileName) //使用当前 System.IO.FileInfo 对象所描述的文件替换指定文件的内容,这一过程将删除原始文件,并创建被替换文件的备份。 public System.IO.FileInfo Replace(string destinationFileName, string destinationBackupFileName) //使用当前 System.IO.FileInfo 对象所描述的文件替换指定文件的内容,这一过程将删除原始文件,并创建被替换文件的备份。还指定是否忽略合并错误。 public System.IO.FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors)
//将某个文件加密,使得只有加密该文件的帐户才能将其解密。 public void Encrypt() //解密由当前帐户使用 System.IO.FileInfo.Encrypt() 方法加密的文件。 public void Decrypt() //永久删除文件。 public override void Delete()
//获取父目录的实例。
public System.IO.DirectoryInfo Directory { get; }
//获取表示目录的完整路径的字符串。
public string DirectoryName { get; }
//获取指示文件是否存在的值。
public override bool Exists { get; }
//获取或设置确定当前文件是否为只读的值。
public bool IsReadOnly { set; get; }
//获取当前文件的大小(字节)。
public long Length { get; }
//获取文件名。
public override string Name { get; }
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有