added some code for file copying
This commit is contained in:
parent
870622f6c7
commit
0a9a80c567
@ -222,6 +222,7 @@ LIBQSECMN_OBJECTS = &
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
||||||
@ -567,6 +568,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_ou
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
||||||
$(CC) -bt=dos -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=dos -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj : .AUTODEPEND ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -bt=dos -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -bt=dos -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=dos -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
@ -340,6 +340,7 @@ DLLQSECMN_OBJECTS = &
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj &
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj &
|
||||||
@ -439,6 +440,7 @@ LIBQSECMN_OBJECTS = &
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
||||||
@ -1103,6 +1105,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
||||||
$(CC) -bt=os2 -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
$(CC) -bt=os2 -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj : .AUTODEPEND ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -bt=os2 -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -bt=os2 -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
$(CC) -bt=os2 -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
@ -1391,6 +1396,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
||||||
$(CC) -bt=os2 -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=os2 -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj : .AUTODEPEND ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -bt=os2 -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -bt=os2 -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=os2 -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@
|
|||||||
fmt-intmax.c
|
fmt-intmax.c
|
||||||
fmt-out.c
|
fmt-out.c
|
||||||
fs.c
|
fs.c
|
||||||
|
fs-copy.c
|
||||||
fs-delete.c
|
fs-delete.c
|
||||||
fs-err.c
|
fs-err.c
|
||||||
fs-make.c
|
fs-make.c
|
||||||
|
@ -108,6 +108,7 @@ DLLQSECMN_OBJECTS = \
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj \
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj \
|
||||||
@ -208,6 +209,7 @@ LIBQSECMN_OBJECTS = \
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj \
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj \
|
||||||
@ -1051,6 +1053,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
||||||
$(CC) -q -c -P- -o$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
$(CC) -q -c -P- -o$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj: ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -q -c -P- -o$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-copy.c
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -q -c -P- -o$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
$(CC) -q -c -P- -o$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
||||||
|
|
||||||
@ -1339,6 +1344,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
||||||
$(CC) -q -c -P- -o$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
$(CC) -q -c -P- -o$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj: ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -q -c -P- -o$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-copy.c
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -q -c -P- -o$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
$(CC) -q -c -P- -o$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ DLLQSECMN_OBJECTS = \
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj \
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj \
|
||||||
@ -179,6 +180,7 @@ LIBQSECMN_OBJECTS = \
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj \
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj \
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj \
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj \
|
||||||
@ -1130,6 +1132,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
||||||
$(CC) /c /nologo /TC /Fo$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
$(CC) /c /nologo /TC /Fo$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj: ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) /c /nologo /TC /Fo$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-copy.c
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) /c /nologo /TC /Fo$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
$(CC) /c /nologo /TC /Fo$@ $(DLLQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
||||||
|
|
||||||
@ -1418,6 +1423,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj: ..\..\lib\cmn\fs.c
|
||||||
$(CC) /c /nologo /TC /Fo$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
$(CC) /c /nologo /TC /Fo$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs.c
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj: ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) /c /nologo /TC /Fo$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-copy.c
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj: ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) /c /nologo /TC /Fo$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
$(CC) /c /nologo /TC /Fo$@ $(LIBQSECMN_CFLAGS) ..\..\lib\cmn\fs-delete.c
|
||||||
|
|
||||||
|
@ -329,6 +329,7 @@ DLLQSECMN_OBJECTS = &
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_intmax.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fmt_out.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj &
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_err.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_make.obj &
|
||||||
@ -428,6 +429,7 @@ LIBQSECMN_OBJECTS = &
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_intmax.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fmt_out.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj &
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_err.obj &
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_make.obj &
|
||||||
@ -1092,6 +1094,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
||||||
$(CC) -bt=nt -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
$(CC) -bt=nt -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_copy.obj : .AUTODEPEND ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -bt=nt -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\dllqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -bt=nt -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
$(CC) -bt=nt -zq -fo=$^@ $(DLLQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
@ -1380,6 +1385,9 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libq
|
|||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs.obj : .AUTODEPEND ..\..\lib\cmn\fs.c
|
||||||
$(CC) -bt=nt -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=nt -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_copy.obj : .AUTODEPEND ..\..\lib\cmn\fs-copy.c
|
||||||
|
$(CC) -bt=nt -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsecmn_fs_delete.obj : .AUTODEPEND ..\..\lib\cmn\fs-delete.c
|
||||||
$(CC) -bt=nt -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
$(CC) -bt=nt -zq -fo=$^@ $(LIBQSECMN_CFLAGS) $<
|
||||||
|
|
||||||
|
@ -675,12 +675,10 @@ static int expand_wildcards (int argc, qse_char_t* argv[], int glob, xarg_t* xar
|
|||||||
if (glob)
|
if (glob)
|
||||||
{
|
{
|
||||||
x = qse_glob (argv[i], collect_into_xarg, xarg,
|
x = qse_glob (argv[i], collect_into_xarg, xarg,
|
||||||
QSE_GLOB_TOLERANT |
|
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
QSE_GLOB_NOESCAPE | QSE_GLOB_IGNORECASE |
|
||||||
QSE_GLOB_NOESCAPE | QSE_GLOB_PERIOD | QSE_GLOB_IGNORECASE,
|
#endif
|
||||||
#else
|
QSE_GLOB_TOLERANT | QSE_GLOB_PERIOD,
|
||||||
QSE_GLOB_PERIOD,
|
|
||||||
#endif
|
|
||||||
xarg->mmgr, qse_getdflcmgr()
|
xarg->mmgr, qse_getdflcmgr()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -59,10 +59,11 @@ typedef enum qse_dir_errnum_t qse_dir_errnum_t;
|
|||||||
|
|
||||||
enum qse_dir_flag_t
|
enum qse_dir_flag_t
|
||||||
{
|
{
|
||||||
QSE_DIR_MBSPATH = (1 << 0),
|
QSE_DIR_MBSPATH = (1 << 0),
|
||||||
QSE_DIR_SORT = (1 << 1),
|
QSE_DIR_SORT = (1 << 1),
|
||||||
QSE_DIR_LIMITED = (1 << 2) /**< limited to normal entries excluding . and .. */
|
QSE_DIR_SKIPSPCDIR = (1 << 2) /**< limited to normal entries excluding . and .. */
|
||||||
};
|
};
|
||||||
|
typedef enum qse_dir_flag_t qse_dir_flag_t;
|
||||||
|
|
||||||
struct qse_dir_ent_t
|
struct qse_dir_ent_t
|
||||||
{
|
{
|
||||||
|
@ -198,13 +198,18 @@ typedef enum qse_fs_opt_t qse_fs_opt_t;
|
|||||||
|
|
||||||
enum qse_fs_cpfile_flag_t
|
enum qse_fs_cpfile_flag_t
|
||||||
{
|
{
|
||||||
QSE_FS_CPFILE_PRESERVE = (1 << 0),
|
QSE_FS_CPFILE_GLOB = (1 << 0),
|
||||||
QSE_FS_CPFILE_REPLACE = (1 << 1),
|
QSE_FS_CPFILE_RECURSIVE = (1 << 1),
|
||||||
QSE_FS_CPFILE_SYMLINK = (1 << 2),
|
QSE_FS_CPFILE_FORCE = (1 << 2),
|
||||||
QSE_FS_CPFILE_NOTGTDIR = (1 << 3), /* no target directory */
|
QSE_FS_CPFILE_PRESERVE = (1 << 3),
|
||||||
|
QSE_FS_CPFILE_REPLACE = (1 << 4),
|
||||||
|
QSE_FS_CPFILE_SYMLINK = (1 << 5),
|
||||||
|
QSE_FS_CPFILE_NOTGTDIR = (1 << 6), /* no target directory */
|
||||||
|
|
||||||
QSE_FS_CPFILE_ALL = (QSE_FS_CPFILE_PRESERVE | QSE_FS_CPFILE_REPLACE |
|
QSE_FS_CPFILE_ALL = (QSE_FS_CPFILE_GLOB | QSE_FS_CPFILE_RECURSIVE |
|
||||||
QSE_FS_CPFILE_SYMLINK | QSE_FS_CPFILE_NOTGTDIR)
|
QSE_FS_CPFILE_FORCE | QSE_FS_CPFILE_PRESERVE |
|
||||||
|
QSE_FS_CPFILE_REPLACE | QSE_FS_CPFILE_SYMLINK |
|
||||||
|
QSE_FS_CPFILE_NOTGTDIR)
|
||||||
};
|
};
|
||||||
typedef enum qse_fs_cpfile_flag_t qse_fs_cpfile_flag_t;
|
typedef enum qse_fs_cpfile_flag_t qse_fs_cpfile_flag_t;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ enum qse_glob_flags_t
|
|||||||
|
|
||||||
/** Exclude special entries from matching.
|
/** Exclude special entries from matching.
|
||||||
* Special entries include . and .. */
|
* Special entries include . and .. */
|
||||||
QSE_GLOB_LIMITED = (1 << 4)
|
QSE_GLOB_SKIPSPCDIR = (1 << 4)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
@ -45,6 +45,7 @@ libqsecmn_la_SOURCES = \
|
|||||||
fmt-intmax.c \
|
fmt-intmax.c \
|
||||||
fmt-out.c \
|
fmt-out.c \
|
||||||
fs.c \
|
fs.c \
|
||||||
|
fs-copy.c \
|
||||||
fs-delete.c \
|
fs-delete.c \
|
||||||
fs-err.c \
|
fs-err.c \
|
||||||
fs-make.c \
|
fs-make.c \
|
||||||
|
@ -107,9 +107,9 @@ libqsecmn_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
|||||||
$(am__DEPENDENCIES_1)
|
$(am__DEPENDENCIES_1)
|
||||||
am__libqsecmn_la_SOURCES_DIST = alg-base64.c alg-rand.c alg-search.c \
|
am__libqsecmn_la_SOURCES_DIST = alg-base64.c alg-rand.c alg-search.c \
|
||||||
alg-sort.c assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c \
|
alg-sort.c assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c \
|
||||||
fma.c fmt-intmax.c fmt-out.c fs.c fs-delete.c fs-err.c \
|
fma.c fmt-intmax.c fmt-out.c fs.c fs-copy.c fs-delete.c \
|
||||||
fs-make.c fs-move.c glob.c hton.c ipad.c lda.c main.c mb8.c \
|
fs-err.c fs-make.c fs-move.c glob.c hton.c ipad.c lda.c main.c \
|
||||||
mbwc.c mbwc-str.c mem.c mux.c nwad.c nwad-skad.c nwif.c \
|
mb8.c mbwc.c mbwc-str.c mem.c mux.c nwad.c nwad-skad.c nwif.c \
|
||||||
nwif-cfg.c nwio.c oht.c opt.c path-base.c path-canon.c \
|
nwif-cfg.c nwio.c oht.c opt.c path-base.c path-canon.c \
|
||||||
path-core.c path-merge.c pio.c pma.c rbt.c rex.c sck.c sio.c \
|
path-core.c path-merge.c pio.c pma.c rbt.c rex.c sck.c sio.c \
|
||||||
sll.c slmb.c str-beg.c str-cat.c str-chr.c str-cnv.c str-cmp.c \
|
sll.c slmb.c str-beg.c str-cat.c str-chr.c str-cnv.c str-cmp.c \
|
||||||
@ -124,7 +124,7 @@ am__libqsecmn_la_SOURCES_DIST = alg-base64.c alg-rand.c alg-search.c \
|
|||||||
@ENABLE_XCMGRS_TRUE@am__objects_2 = cp949.lo cp950.lo
|
@ENABLE_XCMGRS_TRUE@am__objects_2 = cp949.lo cp950.lo
|
||||||
am_libqsecmn_la_OBJECTS = alg-base64.lo alg-rand.lo alg-search.lo \
|
am_libqsecmn_la_OBJECTS = alg-base64.lo alg-rand.lo alg-search.lo \
|
||||||
alg-sort.lo assert.lo chr.lo dir.lo dll.lo env.lo gdl.lo \
|
alg-sort.lo assert.lo chr.lo dir.lo dll.lo env.lo gdl.lo \
|
||||||
htb.lo fio.lo fma.lo fmt-intmax.lo fmt-out.lo fs.lo \
|
htb.lo fio.lo fma.lo fmt-intmax.lo fmt-out.lo fs.lo fs-copy.lo \
|
||||||
fs-delete.lo fs-err.lo fs-make.lo fs-move.lo glob.lo hton.lo \
|
fs-delete.lo fs-err.lo fs-make.lo fs-move.lo glob.lo hton.lo \
|
||||||
ipad.lo lda.lo main.lo mb8.lo mbwc.lo mbwc-str.lo mem.lo \
|
ipad.lo lda.lo main.lo mb8.lo mbwc.lo mbwc-str.lo mem.lo \
|
||||||
mux.lo nwad.lo nwad-skad.lo nwif.lo nwif-cfg.lo nwio.lo oht.lo \
|
mux.lo nwad.lo nwad-skad.lo nwif.lo nwif-cfg.lo nwio.lo oht.lo \
|
||||||
@ -414,17 +414,17 @@ noinst_HEADERS = \
|
|||||||
|
|
||||||
libqsecmn_la_SOURCES = alg-base64.c alg-rand.c alg-search.c alg-sort.c \
|
libqsecmn_la_SOURCES = alg-base64.c alg-rand.c alg-search.c alg-sort.c \
|
||||||
assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c fma.c \
|
assert.c chr.c dir.c dll.c env.c gdl.c htb.c fio.c fma.c \
|
||||||
fmt-intmax.c fmt-out.c fs.c fs-delete.c fs-err.c fs-make.c \
|
fmt-intmax.c fmt-out.c fs.c fs-copy.c fs-delete.c fs-err.c \
|
||||||
fs-move.c glob.c hton.c ipad.c lda.c main.c mb8.c mbwc.c \
|
fs-make.c fs-move.c glob.c hton.c ipad.c lda.c main.c mb8.c \
|
||||||
mbwc-str.c mem.c mux.c nwad.c nwad-skad.c nwif.c nwif-cfg.c \
|
mbwc.c mbwc-str.c mem.c mux.c nwad.c nwad-skad.c nwif.c \
|
||||||
nwio.c oht.c opt.c path-base.c path-canon.c path-core.c \
|
nwif-cfg.c nwio.c oht.c opt.c path-base.c path-canon.c \
|
||||||
path-merge.c pio.c pma.c rbt.c rex.c sck.c sio.c sll.c slmb.c \
|
path-core.c path-merge.c pio.c pma.c rbt.c rex.c sck.c sio.c \
|
||||||
str-beg.c str-cat.c str-chr.c str-cnv.c str-cmp.c str-cpy.c \
|
sll.c slmb.c str-beg.c str-cat.c str-chr.c str-cnv.c str-cmp.c \
|
||||||
str-del.c str-dup.c str-dyn.c str-end.c str-excl.c str-fcpy.c \
|
str-cpy.c str-del.c str-dup.c str-dyn.c str-end.c str-excl.c \
|
||||||
str-fmt.c str-fnmat.c str-incl.c str-join.c str-len.c \
|
str-fcpy.c str-fmt.c str-fnmat.c str-incl.c str-join.c \
|
||||||
str-pac.c str-pbrk.c str-put.c str-rev.c str-rot.c str-set.c \
|
str-len.c str-pac.c str-pbrk.c str-put.c str-rev.c str-rot.c \
|
||||||
str-spl.c str-spn.c str-str.c str-subst.c str-tok.c str-trm.c \
|
str-set.c str-spl.c str-spn.c str-str.c str-subst.c str-tok.c \
|
||||||
str-word.c task.c time.c tio.c tmr.c tre.c tre-ast.c \
|
str-trm.c str-word.c task.c time.c tio.c tmr.c tre.c tre-ast.c \
|
||||||
tre-compile.c tre-match-bt.c tre-match-pa.c tre-parse.c \
|
tre-compile.c tre-match-bt.c tre-match-pa.c tre-parse.c \
|
||||||
tre-stack.c uri.c utf8.c xma.c $(am__append_1) $(am__append_2)
|
tre-stack.c uri.c utf8.c xma.c $(am__append_1) $(am__append_2)
|
||||||
libqsecmn_la_LDFLAGS = -version-info 1:0:0 -no-undefined
|
libqsecmn_la_LDFLAGS = -version-info 1:0:0 -no-undefined
|
||||||
@ -528,6 +528,7 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fma.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fma.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt-intmax.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt-intmax.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt-out.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt-out.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-copy.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-delete.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-delete.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-err.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-err.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-make.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-make.Plo@am__quote@
|
||||||
|
@ -547,7 +547,7 @@ static int read_dir_to_tbuf (qse_dir_t* dir, void** name)
|
|||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
if (dir->status & STATUS_DONE) return (dir->status & STATUS_DONE_ERR)? -1: 0;
|
if (dir->status & STATUS_DONE) return (dir->status & STATUS_DONE_ERR)? -1: 0;
|
||||||
|
|
||||||
if (dir->flags & QSE_DIR_LIMITED)
|
if (dir->flags & QSE_DIR_SKIPSPCDIR)
|
||||||
{
|
{
|
||||||
/* skip . and .. */
|
/* skip . and .. */
|
||||||
while (IS_CURDIR(dir->wfd.cFileName) || IS_PREVDIR(dir->wfd.cFileName))
|
while (IS_CURDIR(dir->wfd.cFileName) || IS_PREVDIR(dir->wfd.cFileName))
|
||||||
@ -617,7 +617,7 @@ static int read_dir_to_tbuf (qse_dir_t* dir, void** name)
|
|||||||
|
|
||||||
if (dir->count <= 0) return 0;
|
if (dir->count <= 0) return 0;
|
||||||
|
|
||||||
if (dir->flags & QSE_DIR_LIMITED)
|
if (dir->flags & QSE_DIR_SKIPSPCDIR)
|
||||||
{
|
{
|
||||||
/* skip . and .. */
|
/* skip . and .. */
|
||||||
while (IS_CURDIR_M(dir->ffb.achName) || IS_PREVDIR_M(dir->ffb.achName))
|
while (IS_CURDIR_M(dir->ffb.achName) || IS_PREVDIR_M(dir->ffb.achName))
|
||||||
@ -677,7 +677,7 @@ static int read_dir_to_tbuf (qse_dir_t* dir, void** name)
|
|||||||
|
|
||||||
if (dir->status & STATUS_DONE) return (dir->status & STATUS_DONE_ERR)? -1: 0;
|
if (dir->status & STATUS_DONE) return (dir->status & STATUS_DONE_ERR)? -1: 0;
|
||||||
|
|
||||||
if (dir->flags & QSE_DIR_LIMITED)
|
if (dir->flags & QSE_DIR_SKIPSPCDIR)
|
||||||
{
|
{
|
||||||
/* skip . and .. */
|
/* skip . and .. */
|
||||||
while (IS_CURDIR_M(dir->f.name) || IS_PREVDIR_M(dir->f.name))
|
while (IS_CURDIR_M(dir->f.name) || IS_PREVDIR_M(dir->f.name))
|
||||||
@ -753,7 +753,7 @@ read:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dir->flags & QSE_DIR_LIMITED)
|
if (dir->flags & QSE_DIR_SKIPSPCDIR)
|
||||||
{
|
{
|
||||||
/* skip . and .. */
|
/* skip . and .. */
|
||||||
if (IS_CURDIR_M(de->d_name) ||
|
if (IS_CURDIR_M(de->d_name) ||
|
||||||
|
@ -201,7 +201,7 @@ static int purge_directory_contents (qse_fs_t* fs, const qse_char_t* path)
|
|||||||
qse_dir_errnum_t errnum;
|
qse_dir_errnum_t errnum;
|
||||||
|
|
||||||
/* 'dir' is asked to skip special entries like . and .. */
|
/* 'dir' is asked to skip special entries like . and .. */
|
||||||
dir = qse_dir_open (fs->mmgr, 0, path, QSE_DIR_LIMITED, &errnum);
|
dir = qse_dir_open (fs->mmgr, 0, path, QSE_DIR_SKIPSPCDIR, &errnum);
|
||||||
if (dir)
|
if (dir)
|
||||||
{
|
{
|
||||||
/* it must be a directory. delete all entries under it */
|
/* it must be a directory. delete all entries under it */
|
||||||
|
@ -73,29 +73,6 @@ struct fop_t
|
|||||||
|
|
||||||
typedef struct fop_t fop_t;
|
typedef struct fop_t fop_t;
|
||||||
|
|
||||||
|
|
||||||
/* internal flags. it must not overlap with qse_fs_cpfile_flag_t enumerators */
|
|
||||||
#define CPFILE_DST_ATTR (1 << 27)
|
|
||||||
#define CPFILE_DST_PATH_DUP (1 << 28)
|
|
||||||
#define CPFILE_DST_FSPATH_DUP (1 << 29)
|
|
||||||
#define CPFILE_DST_FSPATH_MERGED (1 << 30)
|
|
||||||
|
|
||||||
struct cpfile_t
|
|
||||||
{
|
|
||||||
int flags;
|
|
||||||
|
|
||||||
qse_fs_char_t* src_fspath;
|
|
||||||
qse_fs_char_t* dst_fspath;
|
|
||||||
|
|
||||||
qse_char_t* src_path;
|
|
||||||
qse_char_t* dst_path;
|
|
||||||
|
|
||||||
qse_fs_attr_t src_attr;
|
|
||||||
qse_fs_attr_t dst_attr;
|
|
||||||
};
|
|
||||||
typedef struct cpfile_t cpfile_t;
|
|
||||||
|
|
||||||
|
|
||||||
int qse_fs_move (qse_fs_t* fs, const qse_char_t* oldpath, const qse_char_t* newpath)
|
int qse_fs_move (qse_fs_t* fs, const qse_char_t* oldpath, const qse_char_t* newpath)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -481,374 +458,3 @@ static int move_file_in_fs (qse_fs_t* fs, const qse_fs_char_t* oldpath, const qs
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int merge_dstdir_and_file (qse_fs_t* fs, cpfile_t* cpfile)
|
|
||||||
{
|
|
||||||
qse_fs_char_t* fstmp;
|
|
||||||
|
|
||||||
/* if the destination is directory, copy the base name of the source
|
|
||||||
* and append it to the end of the destination, targetting at an entry
|
|
||||||
* in the directory */
|
|
||||||
QSE_ASSERT (cpfile->dst_attr.isdir);
|
|
||||||
|
|
||||||
if (cpfile->dst_path)
|
|
||||||
{
|
|
||||||
qse_char_t* tmp;
|
|
||||||
|
|
||||||
tmp = qse_mergepathdup (cpfile->dst_path, qse_basename (cpfile->src_path), fs->mmgr);
|
|
||||||
if (!tmp)
|
|
||||||
{
|
|
||||||
fs->errnum = QSE_FS_ENOMEM;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cpfile->flags & CPFILE_DST_PATH_DUP)
|
|
||||||
QSE_MMGR_FREE (fs->mmgr, cpfile->dst_path);
|
|
||||||
|
|
||||||
cpfile->dst_path = tmp;
|
|
||||||
cpfile->flags |= CPFILE_DST_PATH_DUP;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fstmp = merge_fspath_dup (cpfile->dst_fspath, get_fspath_base (cpfile->src_fspath), fs->mmgr);
|
|
||||||
if (!fstmp)
|
|
||||||
{
|
|
||||||
fs->errnum = QSE_FS_ENOMEM;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cpfile->flags & CPFILE_DST_FSPATH_DUP)
|
|
||||||
QSE_MMGR_FREE (fs->mmgr, cpfile->dst_fspath);
|
|
||||||
cpfile->dst_fspath = fstmp;
|
|
||||||
cpfile->flags |= CPFILE_DST_FSPATH_DUP;
|
|
||||||
|
|
||||||
if (qse_fs_getattr (fs, cpfile->dst_fspath, &cpfile->dst_attr) >= 0)
|
|
||||||
{
|
|
||||||
cpfile->flags |= CPFILE_DST_ATTR;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cpfile->flags &= ~CPFILE_DST_ATTR;
|
|
||||||
}
|
|
||||||
|
|
||||||
cpfile->flags |= CPFILE_DST_FSPATH_MERGED;
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
#if defined(_WIN32)
|
|
||||||
DWORD copy_file_progress (
|
|
||||||
LARGE_INTEGER TotalFileSize,
|
|
||||||
LARGE_INTEGER TotalBytesTransferred,
|
|
||||||
LARGE_INTEGER StreamSize,
|
|
||||||
LARGE_INTEGER StreamBytesTransferred,
|
|
||||||
DWORD dwStreamNumber,
|
|
||||||
DWORD dwCallbackReason,
|
|
||||||
HANDLE hSourceFile,
|
|
||||||
HANDLE hDestinationFile,
|
|
||||||
LPVOID lpData)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* copy
|
|
||||||
* -> progress
|
|
||||||
* -> abort/cancel
|
|
||||||
* -> replace/overwrite
|
|
||||||
* -> symbolic link
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int copy_file_in_fs (qse_fs_t* fs, cpfile_t* cpfile)
|
|
||||||
{
|
|
||||||
#if defined(_WIN32)
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
DWORD copy_flags = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (flags & QSE_FS_CPFILE_SYMLINK)
|
|
||||||
copy_flags |= COPY_FILE_COPY_SYMLINK;
|
|
||||||
if (!(flags & QSE_FS_CPFILE_REPLACE))
|
|
||||||
copy_flags |= COPY_FILE_FAIL_IF_EXISTS;
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (fs->cbs.cp)
|
|
||||||
{
|
|
||||||
Specify callback???
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (CopyFileEx (oldpath, newpath, QSE_NULL, QSE_NULL, QSE_NULL, copy_flags) == FALSE)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, e);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
|
|
||||||
#elif defined(__OS2__)
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
|
|
||||||
APIRET rc;
|
|
||||||
USHORT opmode = 0;
|
|
||||||
|
|
||||||
if (flags & QSE_FS_CPFILE_REPLACE) opmode |= 1; /* set bit 0 */
|
|
||||||
|
|
||||||
rc = DosCopy (oldpath, newpath, opmode, 0);
|
|
||||||
if (rc != NO_ERROR)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, rc);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
|
|
||||||
#elif defined(__DOS__)
|
|
||||||
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
if (rename (oldpath, newpath) <= -1)
|
|
||||||
{
|
|
||||||
/* FYI, rename() on watcom seems to set
|
|
||||||
* errno to EACCES when the new path exists. */
|
|
||||||
|
|
||||||
unlink (newpath);
|
|
||||||
if (rename (oldpath, newpath) <= -1)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
|
|
||||||
#else
|
|
||||||
if ((cpfile->flags & QSE_FS_CPFILE_SYMLINK) && cpfile->src_attr.islnk)
|
|
||||||
{
|
|
||||||
qse_fs_char_t* tmpbuf;
|
|
||||||
|
|
||||||
/* TODO: use a static buffer is size is small enough */
|
|
||||||
tmpbuf = QSE_MMGR_ALLOC (fs->mmgr, QSE_SIZEOF(*tmpbuf) * (cpfile->src_attr.size + 1));
|
|
||||||
if (tmpbuf == QSE_NULL)
|
|
||||||
{
|
|
||||||
fs->errnum = QSE_FS_ENOMEM;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (QSE_READLINK (cpfile->src_fspath, tmpbuf, cpfile->src_attr.size) <= -1 ||
|
|
||||||
QSE_SYMLINK (tmpbuf, cpfile->dst_fspath) <= -1)
|
|
||||||
{
|
|
||||||
QSE_MMGR_FREE (fs->mmgr, tmpbuf);
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
QSE_MMGR_FREE (fs->mmgr, tmpbuf);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int in = -1, out = -1;
|
|
||||||
qse_ssize_t in_len, out_len;
|
|
||||||
qse_uint8_t* bp;
|
|
||||||
|
|
||||||
in = QSE_OPEN (cpfile->src_fspath, O_RDONLY, 0);
|
|
||||||
out = QSE_OPEN (cpfile->dst_fspath, O_CREAT | O_WRONLY | O_TRUNC, 0777); /* TODO: proper mode */
|
|
||||||
|
|
||||||
if (in <= -1 || out <= -1)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
goto oops;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
in_len = QSE_READ (in, fs->cpbuf, QSE_SIZEOF(fs->cpbuf));
|
|
||||||
if (in_len <= 0) break;
|
|
||||||
|
|
||||||
/* TODO: call progress callback */
|
|
||||||
|
|
||||||
bp = fs->cpbuf;
|
|
||||||
while (in_len > 0)
|
|
||||||
{
|
|
||||||
out_len = QSE_WRITE (out, bp, in_len);
|
|
||||||
if (out_len <= -1) goto oops;
|
|
||||||
bp += out_len;
|
|
||||||
in_len -= out_len;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cpfile->flags & QSE_FS_CPFILE_PRESERVE)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_FUTIMENS)
|
|
||||||
struct timespec ts[2];
|
|
||||||
#elif defined(HAVE_FUTIMES)
|
|
||||||
struct timeval tv[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (QSE_FCHOWN (out, cpfile->src_attr.uid, cpfile->src_attr.gid) <= -1)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
goto oops;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HAVE_FUTIMENS)
|
|
||||||
ts[0].tv_sec = cpfile->src_attr.atime.sec;
|
|
||||||
ts[0].tv_nsec = cpfile->src_attr.atime.nsec;
|
|
||||||
ts[1].tv_sec = cpfile->src_attr.mtime.sec;
|
|
||||||
ts[1].tv_nsec = cpfile->src_attr.mtime.nsec;
|
|
||||||
if (QSE_FUTIMENS (out, ts) <= -1)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
goto oops;
|
|
||||||
}
|
|
||||||
#elif defined(HAVE_FUTIME)
|
|
||||||
tv[0].tv_sec = cpfile->src_attr.atime.sec;
|
|
||||||
tv[0].tv_usec = QSE_NSEC_TO_USEC(cpfile->src_attr.atime.nsec);
|
|
||||||
tv[1].tv_sec = cpfile->src_attr.mtime.sec;
|
|
||||||
tv[1].tv_usec = QSE_NSEC_TO_USEC(cpfile->src_attr.mtime.nsec);
|
|
||||||
if (QSE_FUTIMES (out, tv) <= -1)
|
|
||||||
{
|
|
||||||
fs->errnum = qse_fs_syserrtoerrnum (fs, errno);
|
|
||||||
goto oops;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
# error neither futimens nor futimes exist
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
QSE_CLOSE (out);
|
|
||||||
QSE_CLOSE (in);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
oops:
|
|
||||||
if (out >= 0) QSE_CLOSE (out);
|
|
||||||
if (in >= 0) QSE_CLOSE (in);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static int copy_file (qse_fs_t* fs, cpfile_t* cpfile)
|
|
||||||
{
|
|
||||||
if (cpfile->src_attr.isdir)
|
|
||||||
{
|
|
||||||
fs->errnum = QSE_FS_ENOIMPL; /* TODO: copy a directory into a directory */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
copy_file:
|
|
||||||
if (cpfile->flags & CPFILE_DST_ATTR)
|
|
||||||
{
|
|
||||||
if (cpfile->src_attr.ino == cpfile->dst_attr.ino &&
|
|
||||||
cpfile->src_attr.dev == cpfile->dst_attr.dev)
|
|
||||||
{
|
|
||||||
/* cannot copy a file to itself */
|
|
||||||
fs->errnum = QSE_FS_EINVAL; /* TODO: better error code */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(cpfile->flags & QSE_FS_CPFILE_NOTGTDIR) &&
|
|
||||||
cpfile->dst_attr.isdir)
|
|
||||||
{
|
|
||||||
if (cpfile->flags & CPFILE_DST_FSPATH_MERGED)
|
|
||||||
{
|
|
||||||
/* merge_dstdir_and_file() has been called already.
|
|
||||||
* no more getting into a subdirectory */
|
|
||||||
fs->errnum = QSE_FS_EISDIR;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* arrange to copy a file into a directory */
|
|
||||||
if (merge_dstdir_and_file (fs, cpfile) <= -1) return -1;
|
|
||||||
goto copy_file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(cpfile->flags & QSE_FS_CPFILE_REPLACE))
|
|
||||||
{
|
|
||||||
fs->errnum = QSE_FS_EEXIST;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cpfile->src_attr.isdir)
|
|
||||||
{
|
|
||||||
/* source is not a directory. */
|
|
||||||
return copy_file_in_fs (fs, cpfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* source is a directory. is a recursive copy allowed? */
|
|
||||||
fs->errnum = QSE_FS_ENOIMPL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int qse_fs_cpfilembs (qse_fs_t* fs, const qse_mchar_t* srcpath, const qse_mchar_t* dstpath, int flags)
|
|
||||||
{
|
|
||||||
cpfile_t cpfile;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
QSE_MEMSET (&cpfile, 0, QSE_SIZEOF(cpfile));
|
|
||||||
|
|
||||||
cpfile.flags = flags & QSE_FS_CPFILE_ALL; /* public flags only */
|
|
||||||
|
|
||||||
cpfile.src_fspath = (qse_fs_char_t*)qse_fs_makefspathformbs (fs, srcpath);
|
|
||||||
cpfile.dst_fspath = (qse_fs_char_t*)qse_fs_makefspathformbs (fs, dstpath);
|
|
||||||
if (!cpfile.src_fspath || !cpfile.dst_fspath) goto oops;
|
|
||||||
if (cpfile.dst_fspath != dstpath) cpfile.flags |= CPFILE_DST_FSPATH_DUP;
|
|
||||||
|
|
||||||
if (qse_fs_getattr (fs, cpfile.src_fspath, &cpfile.src_attr) <= -1) goto oops;
|
|
||||||
if (qse_fs_getattr (fs, cpfile.dst_fspath, &cpfile.dst_attr) >= 0) cpfile.flags |= CPFILE_DST_ATTR;
|
|
||||||
|
|
||||||
ret = copy_file (fs, &cpfile);
|
|
||||||
|
|
||||||
qse_fs_freefspathformbs (fs, dstpath, cpfile.dst_fspath);
|
|
||||||
qse_fs_freefspathformbs (fs, srcpath, cpfile.src_fspath);
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
oops:
|
|
||||||
if (cpfile.dst_fspath) qse_fs_freefspathformbs (fs, srcpath, cpfile.dst_fspath);
|
|
||||||
if (cpfile.src_fspath) qse_fs_freefspathformbs (fs, dstpath, cpfile.src_fspath);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int qse_fs_cpfilewcs (qse_fs_t* fs, const qse_wchar_t* srcpath, const qse_wchar_t* dstpath, int flags)
|
|
||||||
{
|
|
||||||
cpfile_t cpfile;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
QSE_MEMSET (&cpfile, 0, QSE_SIZEOF(cpfile));
|
|
||||||
|
|
||||||
cpfile.flags = flags & QSE_FS_CPFILE_ALL; /* public flags only */
|
|
||||||
|
|
||||||
cpfile.src_fspath = (qse_fs_char_t*)qse_fs_makefspathforwcs (fs, srcpath);
|
|
||||||
cpfile.dst_fspath = (qse_fs_char_t*)qse_fs_makefspathforwcs (fs, dstpath);
|
|
||||||
if (!cpfile.src_fspath || !cpfile.dst_fspath) goto oops;
|
|
||||||
if (cpfile.dst_fspath != dstpath) cpfile.flags |= CPFILE_DST_FSPATH_DUP;
|
|
||||||
|
|
||||||
if (qse_fs_getattr (fs, cpfile.src_fspath, &cpfile.src_attr) <= -1) goto oops;
|
|
||||||
if (qse_fs_getattr (fs, cpfile.dst_fspath, &cpfile.dst_attr) >= 0) cpfile.flags |= CPFILE_DST_ATTR;
|
|
||||||
|
|
||||||
ret = copy_file (fs, &cpfile);
|
|
||||||
|
|
||||||
qse_fs_freefspathforwcs (fs, dstpath, cpfile.dst_fspath);
|
|
||||||
qse_fs_freefspathforwcs (fs, srcpath, cpfile.src_fspath);
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
oops:
|
|
||||||
if (cpfile.dst_fspath) qse_fs_freefspathforwcs (fs, srcpath, cpfile.dst_fspath);
|
|
||||||
if (cpfile.src_fspath) qse_fs_freefspathforwcs (fs, dstpath, cpfile.src_fspath);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
@ -51,10 +51,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||||
# define DEFAULT_GLOB_FLAGS (QSE_GLOB_PERIOD | QSE_GLOB_LIMITED | QSE_GLOB_NOESCAPE | QSE_GLOB_IGNORECASE)
|
# define DEFAULT_GLOB_FLAGS (QSE_GLOB_PERIOD | QSE_GLOB_SKIPSPCDIR | QSE_GLOB_NOESCAPE | QSE_GLOB_IGNORECASE)
|
||||||
# define DEFAULT_PATH_SEPARATOR QSE_T("\\")
|
# define DEFAULT_PATH_SEPARATOR QSE_T("\\")
|
||||||
#else
|
#else
|
||||||
# define DEFAULT_GLOB_FLAGS (QSE_GLOB_PERIOD | QSE_GLOB_LIMITED)
|
# define DEFAULT_GLOB_FLAGS (QSE_GLOB_PERIOD | QSE_GLOB_SKIPSPCDIR)
|
||||||
# define DEFAULT_PATH_SEPARATOR QSE_T("/")
|
# define DEFAULT_PATH_SEPARATOR QSE_T("/")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -441,9 +441,12 @@ entry:
|
|||||||
|
|
||||||
if (seg->wild)
|
if (seg->wild)
|
||||||
{
|
{
|
||||||
|
int dir_flags = 0;
|
||||||
|
if (g->flags & QSE_GLOB_SKIPSPCDIR) dir_flags |= QSE_DIR_SKIPSPCDIR;
|
||||||
|
|
||||||
dp = qse_dir_open (
|
dp = qse_dir_open (
|
||||||
g->mmgr, 0, QSE_STR_PTR(&g->path),
|
g->mmgr, 0, QSE_STR_PTR(&g->path),
|
||||||
((g->flags & QSE_GLOB_LIMITED)? QSE_DIR_LIMITED: 0), QSE_NULL);
|
dir_flags, QSE_NULL);
|
||||||
if (dp)
|
if (dp)
|
||||||
{
|
{
|
||||||
tmp = QSE_STR_LEN(&g->path);
|
tmp = QSE_STR_LEN(&g->path);
|
||||||
|
@ -5,14 +5,20 @@
|
|||||||
#include <qse/cmn/path.h>
|
#include <qse/cmn/path.h>
|
||||||
#include <qse/cmn/main.h>
|
#include <qse/cmn/main.h>
|
||||||
#include <qse/cmn/mbwc.h>
|
#include <qse/cmn/mbwc.h>
|
||||||
|
#include <qse/cmn/opt.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
||||||
static void print_usage (const qse_char_t* argv0)
|
static void print_usage (const qse_char_t* argv0)
|
||||||
{
|
{
|
||||||
qse_fprintf (QSE_STDERR, QSE_T("Usage: %s command filename filename\n"), qse_basename(argv0));
|
qse_fprintf (QSE_STDERR, QSE_T("Usage: %s [options] source-filename target-filename\n"), qse_basename(argv0));
|
||||||
qse_fprintf (QSE_STDERR, QSE_T("Command is one of cpfile | cpfile-s\n"));
|
qse_fprintf (QSE_STDERR, QSE_T("Options include:\n"));
|
||||||
qse_fprintf (QSE_STDERR, QSE_T("Filename is a pattern for delXXX\n"));
|
qse_fprintf (QSE_STDERR, QSE_T(" -f force\n"));
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T(" -o overwrite\n"));
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T(" -p preserve\n"));
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T(" -r recursive\n"));
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T(" -s symlink\n"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fs_main (int argc, qse_char_t* argv[])
|
static int fs_main (int argc, qse_char_t* argv[])
|
||||||
@ -20,12 +26,54 @@ static int fs_main (int argc, qse_char_t* argv[])
|
|||||||
qse_fs_t* fs;
|
qse_fs_t* fs;
|
||||||
qse_fs_cbs_t cbs;
|
qse_fs_cbs_t cbs;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
qse_cint_t c;
|
||||||
|
int cpfile_flags = 0;
|
||||||
|
|
||||||
if (argc != 4)
|
static qse_opt_t opt =
|
||||||
{
|
{
|
||||||
print_usage (argv[0]);
|
QSE_T("foprs"),
|
||||||
return -1;
|
QSE_NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
while ((c = qse_getopt (argc, argv, &opt)) != QSE_CHAR_EOF)
|
||||||
|
{
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case QSE_T('f'):
|
||||||
|
cpfile_flags |= QSE_FS_CPFILE_FORCE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QSE_T('o'):
|
||||||
|
cpfile_flags |= QSE_FS_CPFILE_REPLACE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QSE_T('p'):
|
||||||
|
cpfile_flags |= QSE_FS_CPFILE_PRESERVE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QSE_T('r'):
|
||||||
|
cpfile_flags |= QSE_FS_CPFILE_RECURSIVE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QSE_T('s'):
|
||||||
|
cpfile_flags |= QSE_FS_CPFILE_SYMLINK;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QSE_T('?'):
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T("illegal option - '%c'\n"), opt.opt);
|
||||||
|
goto wrong_usage;
|
||||||
|
|
||||||
|
case QSE_T(':'):
|
||||||
|
qse_fprintf (QSE_STDERR, QSE_T("bad argument for '%c'\n"), opt.opt);
|
||||||
|
goto wrong_usage;
|
||||||
|
|
||||||
|
default:
|
||||||
|
goto wrong_usage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.ind + 2 != argc) goto wrong_usage;
|
||||||
|
|
||||||
fs = qse_fs_open (QSE_MMGR_GETDFL(), 0);
|
fs = qse_fs_open (QSE_MMGR_GETDFL(), 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -34,30 +82,18 @@ static int fs_main (int argc, qse_char_t* argv[])
|
|||||||
qse_fs_setopt (fs, QSE_FS_CBS, &cbs);
|
qse_fs_setopt (fs, QSE_FS_CBS, &cbs);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (qse_strcmp(argv[1], QSE_T("cpfile")) == 0)
|
if (qse_fs_cpfile (fs, argv[opt.ind], argv[opt.ind + 1], cpfile_flags) <= -1)
|
||||||
{
|
{
|
||||||
if (qse_fs_cpfile (fs, argv[2], argv[3], 0) <= -1)
|
qse_fprintf (QSE_STDERR, QSE_T("cannot copy file - %d\n"), qse_fs_geterrnum(fs));
|
||||||
{
|
|
||||||
qse_fprintf (QSE_STDERR, QSE_T("cannot copy file - %d\n"), qse_fs_geterrnum(fs));
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (qse_strcmp(argv[1], QSE_T("cpfile-s")) == 0)
|
|
||||||
{
|
|
||||||
if (qse_fs_cpfile (fs, argv[2], argv[3], QSE_FS_CPFILE_SYMLINK) <= -1)
|
|
||||||
{
|
|
||||||
qse_fprintf (QSE_STDERR, QSE_T("cannot copy file - %d\n"), qse_fs_geterrnum(fs));
|
|
||||||
ret = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print_usage (argv[0]);
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
qse_fs_close (fs);
|
qse_fs_close (fs);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
wrong_usage:
|
||||||
|
print_usage (argv[0]);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, qse_achar_t* argv[])
|
int main (int argc, qse_achar_t* argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user