Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justjavac/deno_video_dir
Returns the path to the user's video directory.
https://github.com/justjavac/deno_video_dir
deno dir path system
Last synced: 30 days ago
JSON representation
Returns the path to the user's video directory.
- Host: GitHub
- URL: https://github.com/justjavac/deno_video_dir
- Owner: justjavac
- License: mit
- Created: 2020-08-19T15:23:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T15:30:19.000Z (over 4 years ago)
- Last Synced: 2024-10-03T07:20:56.430Z (about 2 months ago)
- Topics: deno, dir, path, system
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_video_dir
[![tag](https://img.shields.io/github/release/justjavac/deno_video_dir)](https://github.com/justjavac/deno_video_dir/releases)
[![Build Status](https://github.com/justjavac/deno_video_dir/workflows/ci/badge.svg?branch=master)](https://github.com/justjavac/deno_video_dir/actions)
[![license](https://img.shields.io/github/license/justjavac/deno_video_dir)](https://github.com/justjavac/deno_video_dir/blob/master/LICENSE)
[![](https://img.shields.io/badge/deno-v1.3-green.svg)](https://github.com/denoland/deno)Returns the path to the user's video directory.
The returned value depends on the operating system and is either a string,
containing a value from the following table, or `null`.|Platform | Value | Example |
| ------- | ------------------- | ------------------------- |
| Linux | `XDG_VIDEOS_DIR` | /home/justjavac/Videos |
| macOS | `$HOME`/Movies | /Users/justjavac/Movies |
| Windows | `{FOLDERID_Videos}` | C:\Users\justjavac\Videos |## Usage
Requires `allow-env` permission.
Returns `null` if there is no applicable directory or if any other error occurs.
```ts
import videoDir from "https://deno.land/x/video_dir/mod.ts";videoDir();
// Lin: "/home/justjavac/Videos"
// Mac: "/Users/justjavac/Movies"
// Win: "C:\Users\justjavac\Videos"
```## License
[deno_video_dir](https://github.com/justjavac/deno_video_dir) is released under the MIT License. See the bundled [LICENSE](./LICENSE) file for details.