LightTable Api Documentation

Version: 0.8.1

lt.objs.files

Provide fns for doing file related operations. A number of fns
use the node fs library - https://nodejs.org/api/fs.html

absolute?

(absolute? path)
TODO: Add docstring

append

(append path content & [cb])
Append content to path. Optional callback called after append

basename

(basename path)(basename path ext)
TODO: Add docstring

copy

(copy from to)
Copy file or directory to given path

cwd

Directory process is started in

delete!

(delete! path)
Delete file or directory

dir?

(dir? path)
TODO: Add docstring

dirs

(dirs path)
Return directory's directories

exists?

(exists? path)
TODO: Add docstring

ext

(ext path)
TODO: Add docstring

ext->mode

(ext->mode ext)
TODO: Add docstring

file?

(file? path)
TODO: Add docstring

filter-walk

(filter-walk func path)
TODO: Add docstring

full-path-ls

(full-path-ls path)
Return directory's files as full paths

get-roots

(get-roots)
TODO: Add docstring

home

(home)(home path)
Return users' home directory (e.g. ~/) or path under it

ignore-pattern

TODO: Add docstring

line-ending

Current platform-specific line

ls

(ls path)(ls path cb)
Return directory's files

ls-sync

(ls-sync path opts)
Return directory's files applying ignore-pattern. Takes map of options with keys:

* :files - When set only returns files
* :dirs - When set only return directories

lt-home

(lt-home)(lt-home path)
Return LT's home directory

lt-user-dir

(lt-user-dir)(lt-user-dir path)
Return LT's user directory. Used for storing user-related content e.g.
settings, plugins, logs and caches

mkdir

(mkdir path)
Make given directory

move!

(move! from to)
Move file or directory to given path

open

(open path cb)
Open file and in callback return map with file's content in :content

open-sync

(open-sync path)
Open file and return map with file's content in :content

parent

(parent path)
Return directory of path

path->mode

(path->mode path)
TODO: Add docstring

path->type

(path->type path)
TODO: Add docstring

real-path

(real-path c)
TODO: Add docstring

relative

(relative a b)
TODO: Add docstring

resolve

(resolve base cur)
TODO: Add docstring

save

(save path content & [cb])
Save path with given content. Optional callback called after save

separator

Current platform-specific file separator

stats

(stats path)
TODO: Add docstring

trash!

(trash! path)
TODO: Add docstring

walk-up-find

(walk-up-find start find)
Starting at start path, walk up parent directories and return first path
whose basename matches find

without-ext

(without-ext path)
TODO: Add docstring

writable?

(writable? path)
TODO: Add docstring