Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


The Deno Standard Library
Go to Latest
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// Copyright the Browserify authors. MIT License.
export type PathType = "file" | "dir" | "symlink";
/** * Get a human readable file type string. * * @param fileInfo A FileInfo describes a file and is returned by `stat`, * `lstat` */export function getFileInfoType(fileInfo: Deno.FileInfo): PathType | undefined { return fileInfo.isFile ? "file" : fileInfo.isDirectory ? "dir" : fileInfo.isSymlink ? "symlink" : undefined;}