nupp.io.files.messages

Module contents

Types

TypeKindDescription
CapabilitiesrecordThe exact filesystem guarantees supplied by one provider.
EntryrecordOne immediate child of a listed directory.
InforecordMetadata about one resolved filesystem object.
Kindtype
Modetype
Origintype
TemporaryOptionsrecordNaming and placement options for a native temporary path.
UserFoldertype

Types#

Capabilitiesrecord#

record Capabilities ...

The exact filesystem guarantees supplied by one provider.

Members

NameKindDescription
availablefieldWhether filesystem access is available at all.
arbitraryPathsfieldWhether ordinary native paths are accepted.
symbolicLinksfieldWhether symbolic links can be queried and created.
readOnlyAttributesfieldWhether read-only attributes can be changed.
globfieldWhether filesystem globbing is supported.
renamefieldWhether paths can be renamed.
atomicWritefieldWhether atomic replacement writes are supported.
temporaryPathsfieldWhether temporary path owners can be created.
concurrentOpenHandlesfieldWhether one path may have multiple open handles.
currentDirectoryfieldWhether a process working directory exists.
userFoldersfieldWhether conventional user folders can be resolved.
executableDirectoryfieldWhether the running executable's directory can be resolved.
persistentStorageRequestfieldWhether persistent browser storage can be requested.

availablefield#

available: boolean

Whether filesystem access is available at all.

arbitraryPathsfield#

arbitraryPaths: boolean

Whether ordinary native paths are accepted.

readOnlyAttributesfield#

readOnlyAttributes: boolean

Whether read-only attributes can be changed.

globfield#

glob: boolean

Whether filesystem globbing is supported.

renamefield#

rename: boolean

Whether paths can be renamed.

atomicWritefield#

atomicWrite: boolean

Whether atomic replacement writes are supported.

temporaryPathsfield#

temporaryPaths: boolean

Whether temporary path owners can be created.

concurrentOpenHandlesfield#

concurrentOpenHandles: boolean

Whether one path may have multiple open handles.

currentDirectoryfield#

Whether a process working directory exists.

userFoldersfield#

userFolders: boolean

Whether conventional user folders can be resolved.

executableDirectoryfield#

Whether the running executable's directory can be resolved.

persistentStorageRequestfield#

persistentStorageRequest: boolean

Whether persistent browser storage can be requested.

Entryrecord#

record Entry ...

One immediate child of a listed directory.

Members

NameKindDescription
namefieldThe child's name relative to the listed directory.
kindfieldThe child's kind without following a symbolic link.

namefield#

name: string

The child's name relative to the listed directory.

kindfield#

kind: Kind

The child's kind without following a symbolic link.

Inforecord#

record Info ...

Metadata about one resolved filesystem object.

Members

NameKindDescription
kindfieldThe object's filesystem kind.
sizefieldIts byte size, or zero for a directory.
modifiedfieldIts modification time in milliseconds since the Unix epoch, the unit nupp.time.wallTime answers in, with whatever...
readOnlyfieldWhether the native platform refuses writes.

kindfield#

kind: Kind

The object's filesystem kind.

sizefield#

size: integer

Its byte size, or zero for a directory.

modifiedfield#

modified: number

Its modification time in milliseconds since the Unix epoch, the unit nupp.time.wallTime answers in, with whatever fraction the platform records.

readOnlyfield#

readOnly: boolean

Whether the native platform refuses writes.

Kindtype#

type Kind = "file" | "directory" | "symlink" | "other"

Modetype#

type Mode = "r" | "w" | "a" | "r+" | "w+" | "a+"

Origintype#

type Origin = "set" | "current" | "end"

TemporaryOptionsrecord#

record TemporaryOptions ...

Naming and placement options for a native temporary path.

Members

NameKindDescription
directoryfieldThe native directory to create the path in.
prefixfieldA separator-free fragment placed before the random portion of the name.
suffixfieldA separator-free fragment placed after the random portion of the name.

directoryfield#

directory: (string | paths.Path)?

The native directory to create the path in.

prefixfield#

prefix: string?

A separator-free fragment placed before the random portion of the name.

suffixfield#

suffix: string?

A separator-free fragment placed after the random portion of the name.

UserFoldertype#

type UserFolder = "home" | "documents" | "downloads" | "desktop" | "pictures" | "music" | "videos"