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: about 2 months 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T15:30:19.000Z (almost 6 years ago)
- Last Synced: 2026-02-14T04:45:54.489Z (4 months ago)
- Topics: deno, dir, path, system
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_video_dir
[](https://github.com/justjavac/deno_video_dir/releases)
[](https://github.com/justjavac/deno_video_dir/actions)
[](https://github.com/justjavac/deno_video_dir/blob/master/LICENSE)
[](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.