mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Merge all trunk changes, including the WinRT enhancements, into the
sessions branch. FossilOrigin-Name: c62140398344fd1a68a3e6dfe8b4fab280731ebb
This commit is contained in:
@ -19,6 +19,8 @@
|
||||
#
|
||||
# Commands to manipulate the db and the file-system at a high level:
|
||||
#
|
||||
# is_relative_file
|
||||
# test_pwd
|
||||
# get_pwd
|
||||
# copy_file FROM TO
|
||||
# delete_file FILENAME
|
||||
@ -212,6 +214,34 @@ proc do_copy_file {force from to} {
|
||||
}
|
||||
}
|
||||
|
||||
# Check if a file name is relative
|
||||
#
|
||||
proc is_relative_file { file } {
|
||||
return [expr {[file pathtype $file] != "absolute"}]
|
||||
}
|
||||
|
||||
# If the VFS supports using the current directory, returns [pwd];
|
||||
# otherwise, it returns only the provided suffix string (which is
|
||||
# empty by default).
|
||||
#
|
||||
proc test_pwd { args } {
|
||||
if {[llength $args] > 0} {
|
||||
set suffix1 [lindex $args 0]
|
||||
if {[llength $args] > 1} {
|
||||
set suffix2 [lindex $args 1]
|
||||
} else {
|
||||
set suffix2 $suffix1
|
||||
}
|
||||
} else {
|
||||
set suffix1 ""; set suffix2 ""
|
||||
}
|
||||
ifcapable curdir {
|
||||
return "[get_pwd]$suffix1"
|
||||
} else {
|
||||
return $suffix2
|
||||
}
|
||||
}
|
||||
|
||||
# Delete a file or directory
|
||||
#
|
||||
proc delete_file {args} {
|
||||
|
Reference in New Issue
Block a user