Skip to content

Provide a platform-agnostic way to determine the temp. directory, e.g., via an automatic variable. #4216

@mklement0

Description

@mklement0

Related: #3442 and #4215

The various supported platforms have different native ways to determine the directory in which to store temporary files and directories:

  • Windows:
    • $env:TEMP
  • macOS:
    • $env:TMPDIR
  • Linux:
    • /tmp

Currently, there is no platform-agnostic way to refer to this directory, which is cumbersome.

An automatic variable, say $TEMP, could provide this abstraction.

Environment data

PowerShell Core v6.0.0-beta.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions