DataProvider
modules/file-browser.DataProvider
Implements
constructor
new DataProvider(parent
, options
): DataProvider
Parameters
Name | Type |
---|---|
parent |
IViewBased <IViewOptions > |
options |
IFileBrowserOptions |
Returns
Defined in
src/modules/file-browser/data-provider.ts#63
parent
Readonly
parent: IViewBased
<IViewOptions
>
Defined in
src/modules/file-browser/data-provider.ts#64
options
Readonly
options: IFileBrowserOptions
Defined in
src/modules/file-browser/data-provider.ts#65
o
get
o(): this
["options"
]
Alias for options
Returns
this
["options"
]
Defined in
src/modules/file-browser/data-provider.ts#71
onProgress
onProgress(callback
): void
Parameters
Name | Type |
---|---|
callback |
(percentage : number ) => void |
Returns
void
Implementation of
IFileBrowserDataProvider.onProgress
Defined in
src/modules/file-browser/data-provider.ts#132
permissions
permissions(path
, source
): Promise
<Nullable
<IPermissions
>>
Load permissions for path and source
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
Returns
Promise
<Nullable
<IPermissions
>>
Implementation of
IFileBrowserDataProvider.permissions
Defined in
src/modules/file-browser/data-provider.ts#139
canI
canI(action
): boolean
Parameters
Name | Type |
---|---|
action |
string |
Returns
boolean
Implementation of
Defined in
src/modules/file-browser/data-provider.ts#187
items
items(path
, source
, mods?
): Promise
<IFileBrowserItem
[]>
Load items list by path and source
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
mods |
IFileBrowserDataProviderItemsMods |
Returns
Implementation of
IFileBrowserDataProvider.items
Defined in
src/modules/file-browser/data-provider.ts#243
itemsEx
itemsEx(path
, source
, mods?
): Promise
<{ items
: IFileBrowserItem
[] ; loadedTotal
: number
}>
Load items list by path and source
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
mods |
IFileBrowserDataProviderItemsMods |
Returns
Promise
<{ items
: IFileBrowserItem
[] ; loadedTotal
: number
}>
Implementation of
IFileBrowserDataProvider.itemsEx
Defined in
src/modules/file-browser/data-provider.ts#256
tree
tree(path
, source
): Promise
<ISourcesFiles
>
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
Returns
Implementation of
Defined in
src/modules/file-browser/data-provider.ts#311
getPathByUrl
getPathByUrl(url
): Promise
<any
>
Get path by url. You can use this method in another modules
Parameters
Name | Type |
---|---|
url |
string |
Returns
Promise
<any
>
Implementation of
IFileBrowserDataProvider.getPathByUrl
Defined in
src/modules/file-browser/data-provider.ts#343
createFolder
createFolder(name
, path
, source
): Promise
<boolean
>
Create a directory on the server
Parameters
Name | Type | Description |
---|---|---|
name |
string |
Name the new folder |
path |
string |
Relative directory in which you want create a folder |
source |
string |
Server source key |
Returns
Promise
<boolean
>
Implementation of
IFileBrowserDataProvider.createFolder
Defined in
src/modules/file-browser/data-provider.ts#362
move
move(filepath
, path
, source
, isFile
): Promise
<boolean
>
Move a file / directory on the server
Parameters
Name | Type | Description |
---|---|---|
filepath |
string |
The relative path to the file / folder source |
path |
string |
Relative to the directory where you want to move the file / folder |
source |
string |
- |
isFile |
boolean |
- |
Returns
Promise
<boolean
>
Implementation of
Defined in
src/modules/file-browser/data-provider.ts#388
fileRemove
fileRemove(path
, file
, source
): Promise
<string
>
Deleting a file
Parameters
Name | Type | Description |
---|---|---|
path |
string |
Relative path |
file |
string |
The filename |
source |
string |
Source |
Returns
Promise
<string
>
Implementation of
IFileBrowserDataProvider.fileRemove
Defined in
src/modules/file-browser/data-provider.ts#456
folderRemove
folderRemove(path
, file
, source
): Promise
<string
>
Deleting a folder
Parameters
Name | Type | Description |
---|---|---|
path |
string |
Relative path |
file |
string |
The filename |
source |
string |
Source |
Returns
Promise
<string
>
Implementation of
IFileBrowserDataProvider.folderRemove
Defined in
src/modules/file-browser/data-provider.ts#467
folderRename
folderRename(path
, name
, newname
, source
): Promise
<string
>
Rename folder
Parameters
Name | Type |
---|---|
path |
string |
name |
string |
newname |
string |
source |
string |
Returns
Promise
<string
>
Implementation of
IFileBrowserDataProvider.folderRename
Defined in
src/modules/file-browser/data-provider.ts#509
fileRename
fileRename(path
, name
, newname
, source
): Promise
<string
>
Rename file
Parameters
Name | Type |
---|---|
path |
string |
name |
string |
newname |
string |
source |
string |
Returns
Promise
<string
>
Implementation of
IFileBrowserDataProvider.fileRename
Defined in
src/modules/file-browser/data-provider.ts#521
crop
crop(path
, source
, name
, newname
, box
): Promise
<boolean
>
Send command to server to crop image
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
name |
string |
newname |
string | void |
box |
void | ImageBox |
Returns
Promise
<boolean
>
Implementation of
Defined in
src/modules/file-browser/data-provider.ts#570
resize
resize(path
, source
, name
, newname
, box
): Promise
<boolean
>
Send command to server to resize image
Parameters
Name | Type |
---|---|
path |
string |
source |
string |
name |
string |
newname |
string | void |
box |
void | ImageBox |
Returns
Promise
<boolean
>
Implementation of
IFileBrowserDataProvider.resize
Defined in
src/modules/file-browser/data-provider.ts#583
getMessage
getMessage(resp
): string
Parameters
Name | Type |
---|---|
resp |
IFileBrowserAnswer |
Returns
string
Implementation of
IFileBrowserDataProvider.getMessage
Defined in
src/modules/file-browser/data-provider.ts#593
isSuccess
isSuccess(resp
): boolean
Parameters
Name | Type |
---|---|
resp |
IFileBrowserAnswer |
Returns
boolean
Implementation of
IFileBrowserDataProvider.isSuccess
Defined in
src/modules/file-browser/data-provider.ts#597
destruct
destruct(): any
Returns
any
Implementation of
IFileBrowserDataProvider.destruct
Defined in
jodit/src/modules/file-browser/data-provider.ts:601