Tag: 目录

Windows Azure:如何在blob容器中创build子目录

如何在blob容器中创build一个子目录 例如, 在我的blob容器http://veda.blob.core.windows.net/document/ 如果我存储一些文件,它会 http://veda.blob.core.windows.net/document/1.txt http://veda.blob.core.windows.net/document/2.txt 现在,如何创build一个子目录 http://veda.blob.core.windows.net/document/folder/ 这样我可以存储文件 http://veda.blob.core.windows.net/document/folder/1.txt

查找多模块maven reactor项目的根目录

我想使用maven-dependency-plugin从我的多模块项目的所有子模块复制EAR文件到一个相对于整个项目的根目录的目录。 也就是说,我的布局看起来类似于这个,名称改变了: to-deploy/ my-project/ ear-module-a/ ear-module-b/ more-modules-1/ ear-module-c/ ear-module-d/ more-modules-2/ ear-module-e/ ear-module-f/ … 我希望所有的EAR文件都从各自模块的目标目录复制到my-project/../to-deploy所以我最终 to-deploy/ ear-module-a.ear ear-module-b.ear ear-module-c.ear ear-module-d.ear ear-module-e.ear ear-module-f.ear my-project/ … 我可以在每个耳模块中使用相对path来完成,如下所示: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy</id> <phase>install</phase> <goals> <goal>copy</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <version>${project.version}</version> <type>ear</type> <outputDirectory>../../to-deploy</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> 但是我不想在<outputDirectory>元素中指定一个相对path。 我喜欢像${reactor.root.directory}/../to-deploy ,但我找不到像这样的东西。 另外,我宁愿如果有某种方式来inheritance这个Maven的依赖插件configuration,所以我不必为每个EAR模块指定它。 我也尝试从根pominheritance自定义属性: <properties> <myproject.root>${basedir}</myproject.root> […]

如何用Ruby中的一个命令检查一个目录/文件/符号链接是否存在

有没有一种方法来检测一个目录/文件/符号链接/等。 实体(更一般化)存在吗? 我需要一个函数,因为我需要检查可能是目录,文件或符号链接的path数组。 我知道File.exists?"file_path"适用于目录和文件,但不适用于符号链接(即File.symlink?"symlink_path" )。

如何查看目录是否存在或不在Perl中?

要在使用文件之前查看文件是否存在,我们可以使用: if (-e "filename.cgi") { #proceed with your code } 但是如何识别一个目录是否存在?

Windows中的目录/文件夹的树视图?

在Linux / KDE中,我可以看到一个目录树。 我怎样才能在Windows 7中做到这一点? 考虑我不是指“Windows资源pipe理器”。 这只是显示目录,我也想要的文件。

如何列出目录中的所有子目录

我正在处理一个项目,我需要列出目录中的所有子目录,例如我如何列出所有的子目录在c:\

C#删除一个文件夹以及该文件夹内的所有文件和文件夹

我试图删除一个文件夹和该文件夹内的所有文件和文件夹,我使用下面的代码,我得到的错误Folder is not empty ,有什么build议我可以做什么? try { var dir = new DirectoryInfo(@FolderPath); dir.Attributes = dir.Attributes & ~FileAttributes.ReadOnly; dir.Delete(); dataGridView1.Rows.RemoveAt(dataGridView1.SelectedRows[i].Index); } catch (IOException ex) { MessageBox.Show(ex.Message); }

Ruby有mkdir -p吗?

可能重复: 如何在ruby中recursion创build目录? 在Ruby中,我该怎么做: mkdir -p cool/beans 以下是我想到的: Dir.mkdir('cool') unless File.directory?('cool') cool_beans_path = File.join('cool', 'beans') Dir.mkdir(cool_beans_path) unless File.directory?(cool_beans_path) 但是,有没有更好的办法? 我知道我可以这样做: system('mkdir', '-p', File.join('cool', 'beans')) 但是,这不是平台独立的,是吗? 就像,它在Mac上,但不是在Windows上,对不对?

在Linux中的JAVA_HOME目录

有没有我可以用来找出JAVA_HOME目录的Linux命令? 我试过打印出环境variables(“env”),但我找不到目录。

如何检查一个目录是否可以在PHP中写入?

有谁知道我可以检查,看看目录是否可以在PHP中写入? 函数is_writable不适用于文件夹。 (编辑:它工作,看到接受的答案。)