读取resources下文件的方法 网上有问答如下:问: new FileInputStream("src/main/resources/all.properties") new FileInputStream("./src/main/resources/all.properties") 上面两个无法读取maven下资源文件目录下的文件嘛,总是提示找不到该路径,这么写错了嘛,但是我的其他maven可以读取 答: 要取编译后的路径,而不是你看到的src/main/re
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace WindowsFormsApplication1获取目录下文件 { publi
查看当前目录下的文件: find . -type f 查看当前目录下的文件夹: find . -type d 如果文件file1不为空: if [ -s file1 ];then echo "file1 不为空" fi #!/bin/sh for f in `find ./testdir -type f`; do if [ -s $f ];then echo $f is not empty. ec