1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
|
** Usage: %fossil test-file-environment FILENAME...
**
** Display the effective file handling subsystem "settings" and then
** display file system information about the files specified, if any.
**
** Options:
**
** --open-config Open the configuration database first.
** --slash Trailing slashes, if any, are retained.
** --reset Reset cached stat() info for each file.
*/
void cmd_test_file_environment(void){
int i;
int slashFlag = find_option("slash",0,0)!=0;
int resetFlag = find_option("reset",0,0)!=0;
if( find_option("open-config", 0, 0)!=0 ){
Th_OpenConfig(1);
}
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
fossil_print("filenames_are_case_sensitive() = %d\n",
filenames_are_case_sensitive());
fossil_print("db_allow_symlinks_by_default() = %d\n",
db_allow_symlinks_by_default());
fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks());
for(i=2; i<g.argc; i++){
emitFileStat(g.argv[i], slashFlag, resetFlag);
}
}
/*
|
>
|
|
|
>
>
>
>
|
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
|
** Usage: %fossil test-file-environment FILENAME...
**
** Display the effective file handling subsystem "settings" and then
** display file system information about the files specified, if any.
**
** Options:
**
** --allow-symlinks BOOLEAN Temporarily turn allow-symlinks on/off
** --open-config Open the configuration database first.
** --slash Trailing slashes, if any, are retained.
** --reset Reset cached stat() info for each file.
*/
void cmd_test_file_environment(void){
int i;
int slashFlag = find_option("slash",0,0)!=0;
int resetFlag = find_option("reset",0,0)!=0;
const char *zAllow = find_option("allow-symlinks",0,1);
if( find_option("open-config", 0, 0)!=0 ){
Th_OpenConfig(1);
}
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
fossil_print("filenames_are_case_sensitive() = %d\n",
filenames_are_case_sensitive());
fossil_print("db_allow_symlinks_by_default() = %d\n",
db_allow_symlinks_by_default());
if( zAllow ){
g.allowSymlinks = !is_false(zAllow);
}
fossil_print("db_allow_symlinks() = %d\n", db_allow_symlinks());
for(i=2; i<g.argc; i++){
emitFileStat(g.argv[i], slashFlag, resetFlag);
}
}
/*
|