common darktable lua file functions


local df = require "lib/dtutils.file"


The dtutils.file library provides common file manipulation functions used in constructing darktable lua scripts


df - library - the file functions



check if an executable exists


check if a file or path exist


remove a filetype from a filename


create a unique filename from the supplied argment


create a widget to get executable path preferences


copy a file to another name/location


move a file from one directory to another


add a two digit increment to a filename


get the filename without the path or extension


return the path to an executable from a preference


get the filename and extension from a file path


get the filetype from a filename


get the path from a file path


create the directory(ies) if they do not already exists


recursively remove a directory


make a filename safe to pass as an argument


set a preference for the path to an executable


split a filepath into parts


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see