Liking cljdoc? Tell your friends :D

phlegyas.vfs


->filesystemclj

(->filesystem files path-pool id root-path)

Positional factory function for class phlegyas.vfs.filesystem.

Positional factory function for class phlegyas.vfs.filesystem.
sourceraw docstring

->qidclj

(->qid qid-type qid-vers qid-path)

Positional factory function for class phlegyas.vfs.qid.

Positional factory function for class phlegyas.vfs.qid.
sourceraw docstring

->statclj

(->stat dev
        qid-type
        qid-vers
        qid-path
        mode
        atime
        mtime
        length
        name
        size
        ssize
        uid
        gid
        muid
        children
        contents
        permissions
        parent)

Positional factory function for class phlegyas.vfs.stat.

Positional factory function for class phlegyas.vfs.stat.
sourceraw docstring

access-timeclj

(access-time fh)

Get the last access time of a file.

Get the last access time of a file.
sourceraw docstring

add-fidclj

(add-fid state fid tag)

Add a new fid to the fid map, along with the tag id of the request responsible.

Add a new fid to the fid map, along with the tag id of the request responsible.
sourceraw docstring

add-fsclj

(add-fs state fs)

Add the given filesystem to the connection. Used during attach.

Add the given filesystem to the connection. Used during attach.
sourceraw docstring

add-mappingclj

(add-mapping state fid fs path)

Add a new fid to the connection. Takes in the current state, new fid, filesystem id, and path of the fid.

Add a new fid to the connection. Takes in the current state, new fid, filesystem id, and path of the fid.
sourceraw docstring

add-roleclj

(add-role state fsid uid gid)

Add the user/group that issued the attach to the role map.

Add the user/group that issued the attach to the role map.
sourceraw docstring

allowed-op?clj

(allowed-op? permissions operation)
source

attrsclj

(attrs fh)

Get the PosixFileAttributes of a file.

Get the PosixFileAttributes of a file.
sourceraw docstring

create-filesystemclj

(create-filesystem)

Create a filesystem record.

Create a filesystem record.
sourceraw docstring

current-stateclj

source

directory-readerclj

(directory-reader fs paths max-size)

Takes a filesystem, a list of paths, and the requested byte count. Recursively fetches the stat entries for the given paths, packing them into the correct byte format. Returns when either the paths are exhausted, or we reached the byte count. Returns a vector of 2 values, the left is the data, the right is the paths that we could not walk due to size limitations. This can be then consulted on subsequent directory reads.

Takes a filesystem, a list of paths, and the requested byte count.
Recursively fetches the stat entries for the given paths, packing them
into the correct byte format. Returns when either the paths are exhausted,
or we reached the byte count. Returns a vector of 2 values, the left is the
data, the right is the paths that we could not walk due to size limitations.
This can be then consulted on subsequent directory reads.
sourceraw docstring

directory?clj

(directory? fh)

Is the file a directory?

Is the file a directory?
sourceraw docstring

example-filesystem!clj

(example-filesystem!)
source

example-function-for-filesclj

(example-function-for-files & {:keys [connection frame stat]})
source

example-read-writeclj

(example-read-write & {:keys [connection frame stat]})
source

fetch-dataclj

(fetch-data connection frame stat)

Helper function for calling read-fn on a stat.

Helper function for calling `read-fn` on a stat.
sourceraw docstring

fid->fsnamecljmacro

(fid->fsname state fid)

Get the filesystem id that a fid belongs to.

Get the filesystem id that a fid belongs to.
sourceraw docstring

fid->mappingclj

(fid->mapping conn fid)

Get the mapping corresponding to an allocated fid.

Get the mapping corresponding to an allocated fid.
sourceraw docstring

fid->roleclj

(fid->role fid conn)

Given a fid and a connection, return the role associated with it.

Given a fid and a connection, return the role associated with it.
sourceraw docstring

fid->statclj

(fid->stat state fid)

Get the stat corresponding to the fid in the current state of the connection.

Get the stat corresponding to the fid in the current state of the connection.
sourceraw docstring

file->statclj

(file->stat file
            path
            &
            {:keys [read-fn parent length]
             :or {read-fn (var identity) parent nil length nil}})

Given a filesystem path, and a 9P path number, create a stat for it. Optional keyword arguments read-fn is a function that is called upon reads, parent is the path of the directory the file belongs to, and length can be used to manually set file size.

Given a filesystem path, and a 9P path number, create a stat for it. Optional keyword
arguments `read-fn` is a function that is called upon reads, `parent` is the path of
the directory the file belongs to, and `length` can be used to manually set file size.
sourceraw docstring

filenameclj

(filename fh)

Get the name of the file.

Get the name of the file.
sourceraw docstring

frame-afidclj

source

frame-anameclj

source

frame-atimeclj

source

frame-countclj

source

frame-dataclj

source

frame-enameclj

source

frame-fidclj

source

frame-ftypeclj

source

frame-iomodeclj

source

frame-iounitclj

source

frame-lengthclj

source

frame-modeclj

source

frame-msizeclj

source

frame-mtimeclj

source

frame-muidclj

source

frame-nameclj

source

frame-newfidclj

source

frame-nwqidsclj

source

frame-offsetclj

source

frame-oldtagclj

source

frame-qid-pathclj

source

frame-qid-typeclj

source

frame-qid-versclj

source

frame-sizeclj

source

frame-ssizeclj

source

frame-tagclj

source

frame-typeclj

source

frame-unameclj

source

frame-versionclj

source

frame-wnamesclj

source

fsclj

source

fs-nameclj

source

fsidclj

source

groupclj

(group fh)

Get the group of a file.

Get the group of a file.
sourceraw docstring

insert-fileclj

(insert-file fs parent stat)

Given a filesystem, and a path, inserts the stat to the filesystem and updates the provided parent path list of children to include the newly inserted stat.

Given a filesystem, and a path, inserts the stat to the filesystem and updates the
provided parent path list of children to include the newly inserted stat.
sourceraw docstring

map->filesystemclj

(map->filesystem m__7910__auto__)

Factory function for class phlegyas.vfs.filesystem, taking a map of keywords to field values.

Factory function for class phlegyas.vfs.filesystem, taking a map of keywords to field values.
sourceraw docstring

map->qidclj

(map->qid m__7910__auto__)

Factory function for class phlegyas.vfs.qid, taking a map of keywords to field values.

Factory function for class phlegyas.vfs.qid, taking a map of keywords to field values.
sourceraw docstring

map->statclj

(map->stat m__7910__auto__)

Factory function for class phlegyas.vfs.stat, taking a map of keywords to field values.

Factory function for class phlegyas.vfs.stat, taking a map of keywords to field values.
sourceraw docstring

mappingclj

source

modification-timeclj

(modification-time fh)

Get the last modified time of a file.

Get the last modified time of a file.
sourceraw docstring

next-available-pathclj

(next-available-path fs)

Get the next value from the atomic counter.

Get the next value from the atomic counter.
sourceraw docstring

octal-modeclj

(octal-mode fh)

Get the octal mode permissions of a file.

Get the octal mode permissions of a file.
sourceraw docstring

ownerclj

(owner fh)

Get the owner of a file.

Get the owner of a file.
sourceraw docstring

pathclj

source

path->qidclj

(path->qid fs path)

Given a filesystem and a path, return the qid for the path.

Given a filesystem and a path, return the qid for the path.
sourceraw docstring

path->statclj

(path->stat fs path)

Given a filesystem and a path, return the stat of the file.

Given a filesystem and a path, return the stat of the file.
sourceraw docstring

permission-checkclj

(permission-check stat rolemap operation)

Given a stat, a role, and an operation we want to perform, see if we are allowed to perform it.

Given a stat, a role, and an operation we want to perform, see
if we are allowed to perform it.
sourceraw docstring

permission-setclj

(permission-set fh)

Get the set of permissions for a file.

Get the set of permissions for a file.
sourceraw docstring

(print-current-time & {:keys [connection frame stat]})
source

qid-directory?clj

(qid-directory? qid)

Is the provided qid a representation of a directory?

Is the provided qid a representation of a directory?
sourceraw docstring

qid-file?clj

(qid-file? qid)

Is the provided qid a representation of a file?

Is the provided qid a representation of a file?
sourceraw docstring

read-dirclj

(read-dir fs stat)

Given a filesystem and a stat, get all children stats of provided stat.

Given a filesystem and a stat, get all children stats of provided stat.
sourceraw docstring

role-resolveclj

(role-resolve stat role)

Given a stat and a role, find what role we have on the stat.

Given a stat and a role, find what role we have on the stat.
sourceraw docstring

root-dirclj

(root-dir path)

/ stat on a filesystem.

/ stat on a filesystem.
sourceraw docstring

sizeofclj

(sizeof fh)

Get the length of a file.

Get the length of a file.
sourceraw docstring

stat->qidclj

(stat->qid stat)
source

stat->roleclj

(stat->role stat user)

Given a stat, and a user, find what role we have on it.

Given a stat, and a user, find what role we have on it.
sourceraw docstring

stat-sizeclj

(stat-size fname uid gid muid)

Calculate the size of a stat reply.

Calculate the size of a stat reply.
sourceraw docstring

stat-typeclj

(stat-type stat)

Get the type of a stat.

Get the type of a stat.
sourceraw docstring

stateclj

source

symbolic-link?clj

(symbolic-link? fh)

Is the file a symbolic link?

Is the file a symbolic link?
sourceraw docstring

synthetic-fileclj

(synthetic-file filename
                &
                {:keys [owner group mode read-fn write-fn metadata append]
                 :or {owner "root" group "root" mode 256 append false}})

Create a synthetic file stat.

Create a synthetic file stat.
sourceraw docstring

update-childrenclj

(update-children fs path keyname child)

Takes a filesystem, a path, a lookup key (filename, hashed), and the child path. Updates the stat corresponding to path on fs by adding the child.

Takes a filesystem, a path, a lookup key (filename, hashed), and the child path.
Updates the stat corresponding to path on fs by adding the child.
sourceraw docstring

update-mappingclj

(update-mapping state fid data)

Update the mapping for fid with the provided data.

Update the mapping for fid with the provided data.
sourceraw docstring

update-statclj

(update-stat state fid data)

Update the stat associated with fid by adding data to it.

Update the stat associated with fid by adding data to it.
sourceraw docstring

versionclj

(version stat)
source

walk-pathclj

(walk-path fs path wnames)

Given a filesystem, a path, and a vector wnames, step through the vector attempting to resolve the path of each. i.e. if we are in the root, and want to go to /a/b/c, wnames would be ["a", "b", "c"]. If we do not find a match for a wname, we return a list of all paths that we did find. In this case, a fid is not changed. Walks are only successful if the entire path can be walked.

Given a filesystem, a path, and a vector `wnames`, step through the vector
attempting to resolve the path of each. i.e. if we are in the root, and want
to go to /a/b/c, wnames would be ["a", "b", "c"]. If we do not find a
match for a wname, we return a list of all paths that we _did_ find. In this
case, a fid is not changed. Walks are only successful if the entire path can
be walked.
sourceraw docstring

wname->pathclj

(wname->path fs path wname)

Given a filesystem, a path, and a wname (file name), look through the children of the stat for the given path and return the path associated with that name. We hash the name of the file here, and keywordize it, to prevent issues with keywordizing arbitrary strings.

Given a filesystem, a path, and a wname (file name), look through the children
of the stat for the given path and return the path associated with that name.
We hash the name of the file here, and keywordize it, to prevent issues with
keywordizing arbitrary strings.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close