View entire documentation here
localPATH=require"path"-- suppose we run on windowsassert(PATH.IS_WINDOWS)
-- we can use system dependet functionprint(PATH.user_home()) -- C:\Documents and Settings\Adminprint(PATH.currentdir()) -- C:\lua\5.1-- but we can use specific system path notationlocalftp_path=PATH.new('/')
print(ftp_path.join("/root", "some", "dir")) -- /root/some/dir-- All functions specific to system will failassert(notpcall( ftp_path.currentdir ) )-- clean currentdirlocalpath=require"path"path.each("./*", function(P, mode)
ifmode=='directory' thenpath.rmdir(P)
elsepath.remove(P)
endend,{
param="fm"; -- request full path and modedelay=true; -- use snapshot of directoryrecurse=true; -- include subdirsreverse=true; -- subdirs at first
})
