8000 GitHub - studio-rookery/Path
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

studio-rookery/Path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path

Usage

let path = Path("dir")

Create directory

try path.createDirectory(withIntermediateDirectories: true)
try path.createDirectoryIfNotExists(withIntermediateDirectories: true)

Remove

try path.remove()
try path.removeIfExists()

Copy

try path.move(to: destination, overwrite: true, withIntermediateDirectories: true)

Move

try path.copy(to: destination, overwrite: true, withIntermediateDirectories: true)

Parent

let parent = path.parent

Children

let children = path.children()
let recursiveChildren = path.recursiveChildren()

Observe

let pathObserver = PathObserver(for: .documents)

pathObserver.onChange = { path in
    print(path)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0