首页 \ 问答 \ 无法强制删除当前文件夹之外的文件“TypeError:glob pattern string required”(cannot force deleting files outside of current folder “TypeError: glob pattern string required”)

无法强制删除当前文件夹之外的文件“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
更新时间:2022-04-07 13:04

最满意答案

使用

%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 ...
  • 与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 ...
  • 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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)