Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
4e64c5fb
Commit
4e64c5fb
authored
Sep 13, 2002
by
rswindell
Browse files
Moved delfiles from file.cpp to xpdev/dirwrap.c (for sbbsecho).
parent
6044504c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
src/sbbs3/file.cpp
src/sbbs3/file.cpp
+0
-24
src/sbbs3/sbbs.h
src/sbbs3/sbbs.h
+0
-1
No files found.
src/sbbs3/file.cpp
View file @
4e64c5fb
...
...
@@ -267,30 +267,6 @@ extern "C" BOOL filematch(char *filename, char *filespec)
return
(
TRUE
);
}
/****************************************************************************/
/* Deletes all files in dir 'path' that match file spec 'spec' */
/****************************************************************************/
extern
"C"
uint
delfiles
(
char
*
inpath
,
char
*
spec
)
{
char
path
[
MAX_PATH
+
1
];
uint
i
,
files
=
0
;
glob_t
g
;
strcpy
(
path
,
inpath
);
backslash
(
path
);
strcat
(
path
,
spec
);
glob
(
path
,
0
,
NULL
,
&
g
);
for
(
i
=
0
;
i
<
g
.
gl_pathc
;
i
++
)
{
if
(
isdir
(
g
.
gl_pathv
[
i
]))
continue
;
CHMOD
(
g
.
gl_pathv
[
i
],
S_IWRITE
);
// Incase it's been marked RDONLY
if
(
remove
(
g
.
gl_pathv
[
i
])
==
0
)
files
++
;
}
globfree
(
&
g
);
return
(
files
);
}
/*****************************************************************************/
/* Checks the filename 'fname' for invalid symbol or character sequences */
/*****************************************************************************/
...
...
src/sbbs3/sbbs.h
View file @
4e64c5fb
...
...
@@ -941,7 +941,6 @@ BOOL md(char *path);
/* file.cpp */
BOOL
filematch
(
char
*
filename
,
char
*
filespec
);
uint
delfiles
(
char
*
path
,
char
*
spec
);
#endif
/* SBBS */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment