pysepal.sepalwidgets.inputs.FileInput#
- class pysepal.sepalwidgets.inputs.FileInput(*args, **kwargs)[source]#
Custom input field to select a file in the sepal folders.
- Parameters:
extensions (List[str]) – the list of the allowed extensions. the FileInput will only display these extension and folders
folder (Path) – the starting folder of the file input
label (str) – the label of the input
v_model (Unicode) – the default value
clearable (bool) – whether or not to make the widget clearable. default to False
root (Unicode) – the root folder from which you cannot go higher in the tree.
kwargs – any parameter from a v.Flex abject. If set, ‘children’ will be overwritten.
Attributes
ICON_STYLEthe style applied to the icons in the file menu
clearclear btn to remove everything and set back to the ini folder
close_menuextensionsthe extensions list
filethe current file
file_listthe list of files and folder that are available in the current folder
file_menuthe menu that hide and show the file_list
folderthe current folder
initial_folderthe starting point of the file input
loadingloading top bar of the menu component
reloadreload btn to reload the file list on the current folder
rootthe root folder from which you cannot go higher in the tree.
selected_filethe textfield where the file pathname is stored
v_modelthe v_model of the input
Methods
Custom input field to select a file in the sepal folders.
Clear the File selection and move to the root folder.
Manually select a file from it's path.
- FileInput.__init__(extensions=[], folder=PosixPath('/home/docs'), label='search file', v_model='', clearable=False, root='', cache=False, **kwargs)[source]#
Custom input field to select a file in the sepal folders.
- Parameters:
extensions (List[str]) – the list of the allowed extensions. the FileInput will only display these extension and folders
folder (str | Path) – the starting folder of the file input
label (str) – the label of the input
v_model (str) – the default value
clearable (bool) – whether or not to make the widget clearable. default to False
root (str | Path) – the root folder from which you cannot go higher in the tree.
kwargs – any parameter from a v.Flex abject. If set, ‘children’ will be overwritten.
- Return type:
None