System Info
  • Welcome!
  • Installing
  • Quick Start
  • Reference
    • SysInfo
      • kernelArchitecture
      • kernelBitness
      • kernelName
      • kernelVersion
      • operatingSystemName
      • operatingSystemVersion
      • userDirectory
      • userId
      • userName
      • userSpaceBitness
      • cores
      • getTotalPhysicalMemory
      • getFreePhysicalMemory
      • getTotalVirtualMemory
      • getFreeVirtualMemory
      • getVirtualMemorySize
Powered by GitBook
On this page
  • userDirectory
  • Example:

Was this helpful?

  1. Reference
  2. SysInfo

userDirectory

PreviousoperatingSystemVersionNextuserId

Last updated 3 years ago

Was this helpful?

userDirectory

Generally referred to as your home directory.

On most platforms, this is the content of the HOME environment variable.

If you are going to do further manipulation of paths and files you should be aware of the following packages:

Typical values are:

  • Linux - /home/myusername

  • MacOS - /usres/username

  • Windows - \user\username

Example:

import "package:system_info2/system_info2.dart";

print("Home Directory          : ${SysInfo.userDirectory}");

Please help expand the list of examples by raising an issue with examples on the .

path
dcli_core
onpub.dev github site