Environment.SpecialFolderOption 枚举


指定用于获取特殊文件夹路径的选项。Specifies options to use for getting the path to a special folder.

public: enum class Environment::SpecialFolderOption
public enum Environment.SpecialFolderOption
type Environment.SpecialFolderOption = 
Public Enum Environment.SpecialFolderOption


Create 32768

如果文件夹尚未存在,则创建该文件夹的路径。The path to the folder is created if it does not already exist.

DoNotVerify 16384

指向文件夹的路径在返回时不会验证路径是否存在。The path to the folder is returned without verifying whether the path exists. 如果文件夹位于网络上,则指定此选项可以缩短延隔时间。If the folder is located on a network, specifying this option can reduce lag time.

None 0

已验证指向文件夹的路径。The path to the folder is verified. 如果该文件夹存在,则返回路径。If the folder exists, the path is returned. 如果文件夹不存在,则返回空字符串。If the folder does not exist, an empty string is returned. 此选项为默认行为。This is the default behavior.


System.Environment.SpecialFolderOption枚举用于定义方法的确切行为 Environment.GetFolderPathThe System.Environment.SpecialFolderOption enumeration is used to define the precise behavior of the Environment.GetFolderPath method.