• Stars
    star
    72
  • Rank 422,617 (Top 9 %)
  • Language
    Lua
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

File system path manipulation library

lua-path

Licence Build Status Build Status Coverage Status

Documentation

View entire documentation here

Usage

local PATH = require "path"

-- suppose we run on windows
assert(PATH.IS_WINDOWS)

-- we can use system dependet function
print(PATH.user_home())  -- C:\Documents and Settings\Admin
print(PATH.currentdir()) -- C:\lua\5.1

-- but we can use specific system path notation
local ftp_path = PATH.new('/')
print(ftp_path.join("/root", "some", "dir")) -- /root/some/dir

-- All functions specific to system will fail
assert(not pcall( ftp_path.currentdir ) )
-- clean currentdir

local path = require "path"
path.each("./*", function(P, mode)
  if mode == 'directory' then 
    path.rmdir(P)
  else
    path.remove(P)
  end
end,{
  param = "fm";   -- request full path and mode
  delay = true;   -- use snapshot of directory
  recurse = true; -- include subdirs
  reverse = true; -- subdirs at first 
})

More Repositories

1

lua-log

Asynchronous logging library for Lua
Lua
107
star
2

lua-llthreads2

`llthreads` library rewritten without `LuaNativeObjects` code generator
Lua
73
star
3

lua-lluv

Lua binding to libuv
C
66
star
4

lua-travis-example

For experiments with travis-ci
Shell
54
star
5

luacov-coveralls

LuaCov reporter for coveralls.io service
Lua
48
star
6

lua-sendmail

Simple wrapper around luasoket smtp.send
CMake
30
star
7

lua-windows-environment

Windows Lua binaries with LuaRocks and some external dependencies
C
29
star
8

lua-vararg

Library for manipulation of variable arguements of functions
Lua
25
star
9

lua-lluv-curl

Make asyncronus requests using libuv and libcurl
Lua
20
star
10

lua-lluv-websocket

Websocket for lluv library
Lua
19
star
11

ZipWriter

Library for creating ZIP archive for Lua
Lua
18
star
12

lua-odbc

ODBC Library for lua
C
18
star
13

lua-AesFileEncrypt

A simple file encryption library
C
17
star
14

lua-socket-async

Asyncronus wrapper around LuaSocket library
Lua
17
star
15

vscode-mobdebug

MobDebug Debug Adapter for Visual Studio Code
Lua
16
star
16

lua-pop3

POP3 client library for Lua
Lua
15
star
17

lua-split

Implement functions to split strings
Lua
14
star
18

lzmq-zguide

Examples from ZeroMQ Guide
Lua
13
star
19

lua-lluv-gsmmodem

Control GSM modem connected to serial port using AT commands
Lua
12
star
20

lua-spylog

Execute actions based on log records
Lua
12
star
21

lua-sqlite3

fork from http://www.nessie.de/mroth/lua-sqlite3/index.html
Lua
11
star
22

lua-lluv-pegasus

Simple server based on pegasus.lua library
Lua
9
star
23

lua-winreg

Lua binary module to Access Microsoft(R) Windows(R) Registry
C
8
star
24

lua-EventEmitter

Implement EventEmitter on Lua
Lua
8
star
25

lua-voip

Lua
8
star
26

lua-lluv-rs232

Serial port communication library for lluv library
Lua
8
star
27

lua-pegasus-router

Router plugin for Pegasus server
Lua
8
star
28

lua-environ

Manipulate with environment variables
Lua
7
star
29

NginxWinService

Service wrappers for `nginx` and `php-cgi` for Windows
Lua
7
star
30

lua-tpdu

SMS TPDU encoder/decoder
Lua
6
star
31

lua-MultiRequests

Make multiple requests from different coroutines in parallel
Lua
6
star
32

lua-lluv-ssl

SSL/TLS sockets for lluv library
Lua
6
star
33

lua-lluv-ftp

FTP client for lluv library
Lua
6
star
34

lua-ftp

Simple wrapper around LuaSocket ftp
Lua
6
star
35

lua-null

Provide special value `null` for Lua
C
6
star
36

zbs-package

Packages for ZeroBraneStudio
Lua
6
star
37

lua-Parallel

Lua
5
star
38

lua-lluv-esl

FreeSWITCH ESL implementation for lluv library
Lua
5
star
39

lua-lluv-redis

Redis client for lua-lluv library
Lua
5
star
40

luasqlite3

fork from http://lua.sqlite.org
C
5
star
41

lua-lluv-pg

PostgreSQL client based on lluv library
Lua
5
star
42

lua-lzmq-zmq

Wrapper around lzmq library to be compatiable with lua-zmq library
Lua
4
star
43

lua-pdh

Lua binding to Microsoft Performance Data Helper (PDH) library.
C
4
star
44

lzmq-pool

ZMQ socket pool
Lua
4
star
45

lua-pegasus-websocket

WebSocket plugin for Pegasus http server
Lua
4
star
46

lzmq-auth

Implementaion of czmq zauth class
Lua
4
star
47

lua-try

Simple exception support based on LuaSocket
Lua
4
star
48

lua-bgcrypto-sha

C
4
star
49

lua-luq

Light userdata queue
CMake
4
star
50

lua-prefix_tree

Lua
4
star
51

lua-websockets-permessage-deflate

Implement permessage-deflate extension
Lua
3
star
52

lua-OpenHardwareMonitor

Access to OpenHardwareMonitor WMI interface
Lua
3
star
53

lua-lluv-poll-zmq

ZMQ poller for lluv library
Lua
3
star
54

lua-WindowsFirewall

Windows Firewall configuration library
Lua
3
star
55

libmemcached-win32

Fork of https://code.launchpad.net/~mattn/libmemcached/libmemcached-win32
C
3
star
56

lua-avro

Lua
3
star
57

lua-lluv-memcached

Memcached client for lua-lluv library
Lua
3
star
58

lua-lluv-qless

Lua binding for qless - queue / pipeline management system
Lua
3
star
59

luarocks-external

External deps to be able install some binary rocks on Windows.
C
2
star
60

lua-gntp

Implementation of Growl Notify Transport Protocol (GNTP) for Lua
Lua
2
star
61

lua-odbc-pool

ODBC connections pool
Lua
2
star
62

lzmq-monitor

Implementaion of czmq zsock_monitor class
Lua
2
star
63

lbase64

Unofficial repositary of lbase64
Shell
2
star
64

lua-bgcrypto-aes

C
2
star
65

lakefiles

my lakefile for some projects
Lua
1
star
66

moteus.github.com

HTML
1
star
67

lua-lluv-busted

Support async tests for busted with lluv library
Lua
1
star
68

lua-env

Lua library to manipulate environment variables
Lua
1
star
69

lua-odbc-dbi

ODBC Driver for Lua-DBI library
Lua
1
star
70

fusionpbx-app-messenger

Application for FusionPBX to send/receive SMS messages
PHP
1
star
71

lua-websockets-extensions

WebSocket extensions manager
Lua
1
star
72

mod_h323_deps

Build deps for FreeSWITCH mod_h323 on Windows
C++
1
star