Methods
(async, static) create(f) → {Promise.<File>}
Create file
Parameters:
Name | Type | Description |
---|---|---|
f |
- Source:
Returns:
- Type
- Promise.<File>
(async, static) ensure_file_store() → {Promise.<void>}
Ensure that file_store path is physically exists in file system.
In reality just recursively creates full absolute path to db.connectObj.file_store.
- Source:
Returns:
- Type
- Promise.<void>
(async, static) find(where, selectopts) → {Promise.<*>}
Select list of file descriptors
Parameters:
Name | Type | Description |
---|---|---|
where |
||
selectopts |
- Source:
Returns:
- Type
- Promise.<*>
(async, static) findOne(where) → {Promise.<(File|null)>}
Select one file descriptor
Parameters:
Name | Type | Description |
---|---|---|
where |
- Source:
Returns:
- Type
- Promise.<(File|null)>
(async, static) from_req_files(file, user_id, min_role_read)
Create new file
Parameters:
Name | Type | Default | Description |
---|---|---|---|
file |
|||
user_id |
|||
min_role_read |
1 |
- Source:
Returns:
(static) get_new_path(suggest) → {string}
Get absolute path to new file in db.connectObj.file_store.
Parameters:
Name | Type | Description |
---|---|---|
suggest |
path to file inside file store. If undefined that autogenerated uudv4 is used. |
- Source:
Returns:
- path to file
- Type
- string
(async, static) update(id, row) → {Promise.<void>}
Update File descriptor
Parameters:
Name | Type | Description |
---|---|---|
id |
primary key | |
row |
row data |
- Source:
Returns:
no returns
- Type
- Promise.<void>
(async) delete() → {Promise.<{error}>}
Delete file
- Source:
Returns:
- Type
- Promise.<{error}>