操作系统
稳定文件、文件夹与路径,控制台,字节数据,以及本机系统信息
7 个类别,共 209 个节点
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 支持等级
- 第 1 级(拟定)
- 所属包
- 平台
平台
文件、路径、控制台、进程与运行环境,以及针对当前文档的超象编程:运行图与展开对象属性。
文件系统
追加所有行将行追加到文件中, optionally 使用指定的编码,然后关闭文件。追加文本将指定的字符串附加到文件中,如果文件不存在则创建该文件,可以选择使用指定的编码。追加文本创建一个 StreamWriter,用于将 UTF-8 编码的文本追加到现有文件,如果指定的文件不存在,则创建一个新文件。更改文件扩展名复制复制一个现有文件到一个新文件。创建文件在指定路径中创建或截断并覆盖一个文件,选择性地指定缓冲区大小和描述如何创建或覆盖文件的选项。创建目录创建指定路径中所有目录和子目录,除非它们已经存在。创建目录符号链接创建一个由路径标识的目录符号链接,该链接指向目标路径。创建文件符号链接创建一个由路径标识的文件符号链接,指向 pathToTarget。创建符号链接创建文件或目录的符号链接创建临时子目录在当前用户的临时目录中创建一个唯一命名的空目录。创建文本文件创建或打开一个文件以写入 UTF-8 编码的文本。解码 Base64将 Base64 字符串表示解码为字节数组。解密文件使用给定的密钥通过 Encrypt(string path, string key) 方法解密加密文件。删除删除文件或目录删除目录从指定路径删除一个空目录。删除文件删除指定的文件。目录是否存在确定给定路径是否指向磁盘上的现有目录。编码二进制文件为Base64使用 Base64 字符串表示法对二进制文件进行编码。加密文件使用特定密钥加密文件;要解密,请使用相同的密钥。枚举目录返回指定路径下的目录全名的可枚举集合。枚举文件返回指定路径中的完整文件名的可枚举集合。枚举文件系统条目返回指定路径中的文件名和目录名的可枚举集合。文件是否存在确定指定的文件是否存在。获取应用数据文件获取应用数据文件夹获取文件属性获取指定路径文件的 FileAttributes。获取创建时间返回指定文件或目录的创建日期和时间。获取创建时间(UTC)返回指定文件或目录的创建日期和时间(协调世界时 UTC)。获取当前目录获取应用程序的当前工作目录。获取目录返回指定目录中子目录的名称(包括它们的路径)。获取目录根返回指定路径的卷信息、根信息或两者。获取文件的MD5获取文件的MD5字符串表示获取文件返回指定目录中文件的名称(包括它们的路径)。获取文件系统条目返回指定路径中所有文件和子目录的名称。获取最后访问时间返回指定文件或目录最后访问的日期和时间。获取上次访问时间(UTC)返回指定文件或目录上次访问的日期和时间(协调世界时 UTC)。获取最后写入时间返回指定文件或目录最后写入的日期和时间。获取最后写入时间(UTC)返回指定文件或目录最后写入的协调世界时(UTC)日期和时间。获取逻辑驱动器检索此计算机上逻辑驱动器的名称,形式为"<驱动器字母>:\"。获取父目录检索指定路径的父目录,包括绝对路径和相对路径。获取特殊文件夹中的路径获取特殊文件夹获取临时文件路径在磁盘上创建一个唯一命名的零字节临时文件,并返回该文件的完整路径。获取临时文件夹路径获取临时文件夹路径,并可以选择性地创建该文件夹。获取工作目录移动移动文件或目录到新路径移动目录移动文件或目录及其内容到新位置。移动文件移动指定的文件到新位置并更改文件名,如果目标文件已存在,可以选择替换。打开文件打开指定路径的FileStream,并使用指定模式(默认的读/写访问)。打开读取打开一个现有的文件以进行读取。打开文本文件打开一个现有的 UTF-8 编码文本文件以进行读取。打开写入打开一个现有文件或创建一个新文件以进行写入。读取所有字节打开一个二进制文件,将文件内容读取到字节数组中,然后关闭该文件。读取所有行打开一个文件,读取文件的所有行,可选地使用指定的编码,然后关闭文件。读取所有文本打开一个文件,读取文件中的所有文本,选定使用指定的编码(Encoding),然后关闭文件。读取文件行读取文件的行,选用指定的编码(可选)。重命名文件替换文件用另一个文件的内容替换指定文件的内容,删除原始文件,并创建被替换文件的备份,选项上可以忽略合并错误。解析目录链接目标获取指定目录链接的目标。解析文件链接目标获取指定文件链接的目标。解析链接目标解析符号链接到文件或目录设置属性设置指定路径上文件的指定文件属性。设置创建时间设置文件创建的日期和时间。设置创建时间 UTC设置文件创建的日期和时间(以协调世界时 UTC 表示)。设置当前工作目录设置应用程序的当前工作目录为指定的目录。设置最后访问时间设置指定文件的最后访问日期和时间。设置最后访问时间 UTC设置指定文件最后访问的日期和时间(以协调世界时 UTC 显示)。设置最后写入时间设置指定文件的最后写入日期和时间。设置最后写入时间(UTC)设置指定文件的最后写入时间(以协调世界时间 UTC 表示)。设置工作目录快速创建空文件在指定路径中创建文件,或者截断并覆盖文件,具有可选大小(对于非文本文件)。写入所有字节创建一个新文件,将指定的字节数组写入文件中,然后关闭文件。写入所有行创建一个新文件,将字符串集合写入文件,然后关闭文件,默认使用UTF8编码(可选地指定其他编码)。写文本到文件创建一个新文件,将指定的字符串写入文件,然后关闭文件,可选地使用指定的编码。
输入缓冲区
复制缓冲区Returns a self-contained immutable copy of this buffer.相等Determines whether this buffer has the same visible bytes as another buffer.字节Gets an enumerable over the visible bytes in this immutable byte array.字节序Gets the byte order used by numeric read operations.是否为空Gets a value indicating whether this immutable byte array contains no bytes.字节Gets the byte at the specified zero-based index.长度Gets the number of bytes visible in this immutable byte array.文本编码Gets the encoding used by string read operations.获取枚举器Returns an enumerator over the visible bytes.获取哈希码Gets a hash code based on the visible bytes.读取真否Reads a Boolean and returns the remaining bytes.在偏移处读取真否Reads a Boolean at an explicit offset without consuming bytes.读取字节Reads a byte and returns the remaining bytes.读取多个字节Reads bytes from the beginning of this buffer and returns the remaining bytes.在偏移处读取多个字节Reads bytes at an explicit offset without consuming bytes.在偏移处读取字节Reads a byte at an explicit offset without consuming bytes.读取数字Reads a 64-bit floating-point value and returns the remaining bytes.在偏移处读取数字Reads a 64-bit floating-point value at an explicit offset without consuming bytes.读取低精度数字Reads a 32-bit floating-point value and returns the remaining bytes.在偏移处读取低精度数字Reads a 32-bit floating-point value at an explicit offset without consuming bytes.读取 GUIDReads a GUID and returns the remaining bytes.在偏移处读取 GUIDReads a GUID at an explicit offset without consuming bytes.读取整数Reads a 32-bit signed integer and returns the remaining bytes.在偏移处读取整数Reads a 32-bit signed integer at an explicit offset without consuming bytes.读取大整数Reads a 64-bit signed integer and returns the remaining bytes.在偏移处读取大整数Reads a 64-bit signed integer at an explicit offset without consuming bytes.读取有符号字节Reads a signed byte and returns the remaining bytes.在偏移处读取有符号字节Reads a signed byte at an explicit offset without consuming bytes.读取小整数Reads a 16-bit signed integer and returns the remaining bytes.在偏移处读取小整数Reads a 16-bit signed integer at an explicit offset without consuming bytes.读取文本Reads a fixed-size string from the beginning of this buffer and returns the remaining bytes.在偏移处读取文本Reads a fixed-size string at an explicit offset without consuming bytes.读取正整数Reads a 32-bit unsigned integer and returns the remaining bytes.在偏移处读取正整数Reads a 32-bit unsigned integer at an explicit offset without consuming bytes.读取大正整数Reads a 64-bit unsigned integer and returns the remaining bytes.在偏移处读取大正整数Reads a 64-bit unsigned integer at an explicit offset without consuming bytes.读取小正整数Reads a 16-bit unsigned integer and returns the remaining bytes.在偏移处读取小正整数Reads a 16-bit unsigned integer at an explicit offset without consuming bytes.跳过Skips a number of bytes and returns the remaining bytes.切片Returns a slice of this immutable byte array.转为数组Returns a copy of the visible bytes.转为文本Returns a hexadecimal preview of this buffer.设置字节序Returns a new immutable byte array with the same bytes but a different numeric byte order.设置文本编码Returns a new immutable byte array with the same bytes but a different string encoding.从数组创建Creates an immutable byte array from a byte array by copying its contents.从文件创建Reads all bytes from a file into a new immutable byte array.从流创建Reads all bytes from a stream into a new immutable byte array.空缓冲区Gets an empty immutable byte array.
输出缓冲区
输出缓冲区Creates a new immutable constructive byte array.清空Returns an empty buffer using the same settings.相等Determines whether this object contains the same bytes as another immutable constructive byte array.字节序Gets the byte order used by numeric write operations.是否为空Gets whether this buffer contains no bytes.长度Gets the number of bytes currently written.文本编码Gets the encoding used by string write operations.获取哈希码Returns a hash code based on the current bytes.保存Saves the current bytes to a file.转为数组Returns a copy of the current bytes.转为文本Returns a hexadecimal preview of the current bytes.设置字节序Returns a copy with a different numeric byte order.设置文本编码Returns a copy with a different string encoding.写入真否写入一个真否值,占一个字节。写入字节写入一个字节。写入多个字节Writes empty zero padding.写入数字写入一个 64 位浮点数。写入低精度数字写入一个 32 位浮点数。写入 GUID按 Guid.ToByteArray() 在运行时的字节表示写入一个 GUID。写入整数写入一个 32 位有符号整数。写入大整数写入一个 64 位有符号整数。写入有符号字节写入一个有符号字节。写入小整数写入一个 16 位有符号整数。写入定长文本Writes a fixed-size string using exactly the encoded byte count of Value.写入以零结尾的文本Writes a zero-terminated string.写入正整数写入一个 32 位无符号整数。写入大正整数写入一个 64 位无符号整数。写入小正整数写入一个 16 位无符号整数。空缓冲区Gets an empty immutable constructive byte array.
路径
Alt Directory Separator CharDirectory Separator CharInvalid Path CharsPath SeparatorVolume Separator CharChange ExtensionCombineEnds In Directory SeparatorExistsGet Directory NameGet ExtensionGet File NameGet File Name Without ExtensionGet Full PathGet Invalid File Name CharsGet Invalid Path CharsGet Path RootGet Random File NameGet Relative PathGet Temp File NameGet Temp PathHas ExtensionIs Path Fully QualifiedIs Path RootedJoinTrim Ending Directory Separator
可变字节数组构建器
可变字节数组构建器Creates a new mutable constructive byte array.清空Clears the current bytes.释放Disposes this mutable buffer.字节序Gets the byte order used by numeric write operations.是否为空Gets whether this buffer contains no bytes.长度Gets the number of bytes currently written.文本编码Gets the encoding used by string write operations.保存Saves the current bytes to a file.转为数组Returns a copy of the current bytes.转为不可变字节数组Converts this mutable buffer to an immutable constructive byte array.写入真否写入一个真否值,占一个字节。写入字节写入一个字节。写入多个字节Writes empty zero padding.写入数字写入一个 64 位浮点数。写入低精度数字写入一个 32 位浮点数。写入 GUID按 Guid.ToByteArray() 在运行时的字节表示写入一个 GUID。写入整数写入一个 32 位有符号整数。写入大整数写入一个 64 位有符号整数。写入有符号字节写入一个有符号字节。写入小整数写入一个 16 位有符号整数。写入定长文本Writes a fixed-size string using exactly the encoded byte count of Value.写入以零结尾的文本Writes a zero-terminated string.写入正整数写入一个 32 位无符号整数。写入大正整数写入一个 64 位无符号整数。写入小正整数写入一个 16 位无符号整数。