1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-26 15:50:04 +08:00
SpaceVim/docs/api/file.md

33 lines
1.2 KiB
Markdown
Raw Normal View History

2017-02-15 23:49:16 +08:00
---
title: "file api"
description: "file API provides some basic functions and values for current os."
2017-02-15 23:49:16 +08:00
---
# [Available APIs](../) >> file
<!-- vim-markdown-toc GFM -->
- [values](#values)
- [functions](#functions)
<!-- vim-markdown-toc -->
2017-02-17 21:02:14 +08:00
2017-02-15 23:49:16 +08:00
## values
| name | description |
| ------------- | ---------------------------------------------- |
| separator | The system-dependent name-separator character. |
| pathSeparator | The system-dependent path-separator character. |
2017-02-16 23:14:23 +08:00
2017-02-15 23:49:16 +08:00
## functions
| name | description |
| ------------------------- | ----------------------------------------------- |
| `fticon(file)` | return the icon of specific file name or path |
| `write(message, file)` | append message to file |
| `override(message, file)` | override message to file |
| `read(file)` | read message from file |
| `ls(dir, if_file_only)` | list files and directorys in specific directory |
| `updateFiles(files)` | update the contents of all files |