无法强制删除当前文件夹之外的文件“TypeError:glob pattern string required”(cannot force deleting files outside of current folder “TypeError: glob pattern string required”)
我想使用del package清理当前文件夹之外的文件夹。 但是,我不断收到错误:“TypeError:glob pattern string required”。
我的gulp文件:
var buildStyleDir = '../B/build/styles/**/*';//'build/styles'; gulp.task('clean', function (cb) { return del([buildStyleDir, {force: true}], cb); });
文件夹结构是
A gulpfile B build styles
你知道我为什么会收到这个错误,虽然我使用的是全局模式吗?
I want to clean a folder outside of the current folder using del package. However, I keep getting an error: "TypeError: glob pattern string required".
My gulp file:
var buildStyleDir = '../B/build/styles/**/*';//'build/styles'; gulp.task('clean', function (cb) { return del([buildStyleDir, {force: true}], cb); });
The folder structure is
A gulpfile B build styles
Do you know why I am getting this error although I am using the global pattern?
原文:https://stackoverflow.com/questions/44106774
最满意答案
使用
%let testDate = %sysfunc(datetime());
你现在正在做的是将宏设置为函数,而不是函数的返回值。
%sysfunc()
解析函数并存储输出。Use
%let testDate = %sysfunc(datetime());
What you are doing now is setting the macro to the function, not the return value of the function.
%sysfunc()
resolves the function and you store the output.
相关问答
更多-
什么是 nl sas[2023-05-10]
SAS,NL-SAS,SATA硬盘的区别 NL-SAS的是采用SAS的磁盘接口和SATA的盘体的综合体。换句话,Near Line (NL) SAS是带有SAS接口的“企业级SATA驱动器”。 SAS是串行scsi,SATA是串行ATA。 SAS 向下兼容SATA SCSI硬盘一般在10Krpm 或15krpm,而ATA硬盘在7.2Krpm 左右。 最初的SAS标准提供了300MB/s(SAS1.0),并计划推出的下一代SAS规范中,速度已经提高到了600MB/s(SAS2.0),SAS被期望最终能够达到1 ... -
要准确匹配默认日期时间结构的SAS输出,您需要使用as.POSIXct,如注释中所述,另外使用tz = UTC参数: sasDateTimes <- c(1706835972, 1716835972, 1726835972, 1736835972, 1746835972, 1756835972, 1766835972, 1776835972, 1786835972, 1796835972, 1806835972, 1816835972, 1826835972, 1836835972, 184683597 ...
-
我不知道有关信息,但这对函数调用肯定是可行的。 data _null_; x="1278486000000"; y=datepart(intnx('dtyear',input(x,best32.)/1000,10,'s')); put y= date.; run; 我们假装它是一个1960年代,然后调整到1970年代。 这将略微偏离您的答案,因为您的答案会根据时区进行调整。 如果您愿意,也可以单独调整时区的SAS值。 I don't know about an informat, but this is ...
-
SAS到R日期时间转换(SAS to R datetime conversion)[2023-08-22]
与R类似,SAS Date和DateTime值可以包含您希望的任何来源。 默认格式有一个默认格式(两者都是1/1/1960),但您可以使用日期时间字段表示您希望的任何原点,并且它通常仍可以与任何日期时间函数完美配合(尽管它不会显示除非你写自定义格式,否则请正确使用。 如上所示,使用R_hour1可能会有不同的原点。 因此,您必须询问生成数据的人员该字段的含义及其来源应该是什么。 Similar to R, SAS Date and DateTime values can have whatever orig ... -
这是B8601DZw.d格式; 所以你可以使用B8601DZ30. 我相信。 data _null_; dt_char='2008-10-08T07:06:08.248635000Z'; dt_num = input(dt_char,B8601DZ30.); put dt_num= datetime.; run; That's B8601DZw.d format; so you can use B8601DZ30. I believe. data _null_; ...
-
在SAS中,您将使用datepart()函数从datetime值中提取日期值: where datepart(datetime) = '14sep2014'd 没有必要指定格式,因为它不会影响基础值。 In SAS you would use the datepart() function to extract the date value from the datetime value: where datepart(datetime) = '14sep2014'd There is no need ...
-
使用 %let testDate = %sysfunc(datetime()); 你现在正在做的是将宏设置为函数,而不是函数的返回值。 %sysfunc()解析函数并存储输出。 Use %let testDate = %sysfunc(datetime()); What you are doing now is setting the macro to the function, not the return value of the function. %sysfunc() resolves the ...
-
SAS信息日期时间毫秒(SAS informat datetime milliseconds)[2022-02-18]
datetime变量是一个数值变量,就像任何其他数字变量一样。 我们只知道自01jan1960T00:00:00以来的秒数。 希望这可以帮助。 data _null_; /* for date time, 1 means 1 sec since midnight jan 1st 1960 */ dt = 1; put dt :datetime.; /* you can show the hundredth of second using datetime format */ dt = ... -
你能将format参数传递给pandas.to_datetime()吗? 像: pandas.to_datetime(date_column, format='%d%b%Y') 如果您可以将日期作为字符串,那么采用strptime格式的任何日期解析函数都应该使用模式%d%b%Y : >>> datetime.datetime.strptime('12FEB1993', '%d%b%Y') datetime.datetime(1993, 2, 12, 0, 0) 编辑: 看起来pandas.to_datet ...
-
两者都不是常量,而是Public Shared ReadOnly字段( 证据 )。 因此编译器不接受DateTime.MinValue作为可选参数中的常量表达式: Sub FooMethod(Optional d As DateTime = DateTime.MinValue) 'COMPILER ERROR ' End Sub 但你可以使用Nothing ,这意味着VB.NET中的默认值,而DateTime.MinValue是默认值: Sub FooMethod(Optional d As Da ...