FolderPath
classin packageklyn.io
public class FolderPath extends Path:
└ FolderPath
Represents a directory path.
import klyn.io

root = Path.cwd
names = root.listNames()
print(names.size)
Properties inherited from Path: cwd, exists, isAbsolute, isDirectory, isNormalized, isRegular, isSymlink, klynHome, lastModified, tempDir, userHome
Constructors
Modifier and Type Member Description
public FolderPath
FolderPath(base as FolderPath, names... as String):
Convenience overload when the base is already a FolderPath.
public FolderPath
FolderPath(base as Path, names... as String):
Creates a directory path by resolving multiple child segments from a base path.
public FolderPath
FolderPath(filename as String):
Creates a directory path wrapper from a path string.
public FolderPath
FolderPath(path as Path):
Creates a directory path wrapper from another path instance.
Methods
Modifier and Type Member Description
public list
list() as ArrayList<Path>:
Lists direct children as paths.
public listNames
listNames() as ArrayList<String>:
Lists direct child names.
public mkdir
mkdir() as Void throws IOException:
Creates this directory only.
public mkdirs
mkdirs() as Void throws IOException:
Creates this directory and all missing parent directories.
public removeAll
removeAll() throws IOException:
Recursively removes the folder content and the folder itself.
Methods inherited from Path: absolute, delete, endsWith, extension, file, folder, get, lastModified, name, normalize, parent, relativize, remove, rename, resolve, resolve, resolve, resolve, startsWith, toAbsolute, toString, touch
Operators inherited from Path: operator!=(left as Path, right as Path) as Boolean:, operator==(left as Path, right as Path) as Boolean: