TruePath icon indicating copy to clipboard operation
TruePath copied to clipboard

Check if a file or directory

Open ForNeVeR opened this issue 10 months ago • 3 comments

There should be a method to check if a path represents an existing file or a directory.

Perhaps something like this?

struct LocalPath
{
  // …
  // null -> not exists
  public FileEntryKind? ReadKind() { … }
}

enum FileEntryKind
{
  File,
  Directory,
  // others: Junction, Symlink?
}

ForNeVeR avatar Apr 21 '24 20:04 ForNeVeR