`
lichangwei
  • 浏览: 75375 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

The usage of File.separator

    博客分类:
  • java
阅读更多
Config archive-directory in xml file to specify the path of the file generated.
<archive-directory>E:/archive/sample</archive-directory>
In Java:
if(!directory.endsWith("/")||!directory.endsWith("\\")){
            directory=directory+File.separator;
        }
Java API write:
File.separator returns '\\' in MS windows, '/' in Unix

java.io.IOException The system cannot find the path specified' will be encountered.(E:/archive/sample\***)

Resolution:
<archive-directory>E:\\archive\\sample</archive-directory>
or
<archive-directory>E:\archive\sample</archive-directory>
分享到:
评论

相关推荐

    Android代码-SilkyAnimation

    SilkyAnimation 用SurfaceView来播放帧动画,避免在很多帧的情况下使用AnimationDrawable带来的OOM和卡顿问题。... File.separator "bird") mAnimation.start(file); 从assets目录中读取资源 get r

    Android代码-android-storage

    android-storage Library to create, read, delete, append, encrypt files and more, on internal or external disk spaces with a really simple API. ...String newDir = path File.separator "My Sample Director

    pgrep [Win]

    Search for PATTERN in each FILE or standard input and output a paragraph separated by separator. Example: python pgrep.py -i 'hello world' menu.h main.c OPTIONS: -c, --count Suppress normal output; ...

    shell cheat sheet

    - **Internal File Separator**: `$IFS` defines the internal field separator used by the shell when splitting input lines. For example, `IFS=$'\n'` sets the separator to newline characters. - **Shell ...

    Sakemail

    :)26/3/981.6.1- Added a FUNCFileName private variable to manage the complete path of the attached file. I receive problems reports with this, it work now ?.- Reduced the line sleep to 30 (tell me if ...

    python3.6.5参考手册 chm

    PEP 486: Make the Python Launcher aware of virtual environments PEP 488: Elimination of PYO files PEP 489: Multi-phase extension module initialization Other Language Changes New Modules typing ...

    EurekaLog_7.5.0.0_Enterprise

    7)....Added: Streaming unpacked debug info into temporal files instead of memory - this greatly reduces run-time application memory usage at cost of slightly slower exception processing. This also ...

    php.ini-development

    The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored,...

    sqluldr24.0.1版本

    ncharset= national character set name of the target database. parfile = read command option from parameter file for field and record, you can use '0x' to specify hex character code, \r=0x0d \n=...

    sqluldr2 4.0.1版本 oracle数据导出工具

    ncharset= national character set name of the target database. parfile = read command option from parameter file for field and record, you can use '0x' to specify hex character code, \r=0x0d \n=...

    Linux Shell编程(基础教程

    awk -F',' '{print $1 "," $3}' file.txt # Extract columns using comma as separator ``` 这些命令构成了 Shell 脚本的基本组成部分,熟悉它们能够帮助你更高效地编写和调试脚本。 #### 2. 流程控制 流程控制...

    ant学习笔记之(ant执行命令的详细参数和Ant自带的系统属性)

    例如,`usage`用于显示帮助信息,`clean`用于清理环境,`javadoc`用于生成Java文档,`jar`用于打包成JAR文件,而`all`则通常用于执行所有任务。通过这些任务,Ant可以调用Java编译器(javac)、Java文档生成器...

    csv2json:简单快速的CSV到JSON的流式传输

    csv2json ... Convert booleans and numeric to their type instead of strings. -s &lt;separator&gt;, --separator=&lt;separator&gt; Field separator to use (default to comma “,”). -t, --tsv Use ta

    Sqlite数据库sqlite3命令小记.txt

    SQLite version 3.3.17 Enter ".help" for usage hints. ``` ##### 3. 使用 SQL 语句 在 SQLite3 中可以直接执行 SQL 语句来创建表、插入数据等操作。例如: ```sql sqlite&gt; CREATE TABLE tbl1 (one VARCHAR(10), ...

    java Scanner 的用法

    scanner.useDelimiter(System.getProperty("line.separator")); while (scanner.hasNext()) { parseLine(scanner.next()); } scanner.close(); } catch (FileNotFoundException e) { System.out.println(e)...

    Scanner类的用法

    System.err.println("usage: java ReadHuman fileLocation"); System.exit(0); } readFile(args[0]); } } ``` 此段代码用于从指定文件中读取数据。文件中的每一行包含四个字段:姓名、年龄、日期和是否认证。`...

    branch-name-lint:替换您的分支名称

    分支名称 验证并删除git分支... $ branch-name-lint config-file.json CLI options.json 具有branchNameLinter属性的任何有效JSON文件。 { "branchNameLinter": { "prefixes": [ "feature", "hotfix", "rele

    numeral-cli:令人敬畏的 numeric.js 的命令行界面

    数字cli 令人敬畏的 numeric.js 的命令行界面安装 npm i -g numeral-cli用法 Usage: numeral -i [inputfile] -o [outputfile] -f [format] -s [separator]Options: -f, --format [default: ""] -i, --input [default...

    awk 学习笔记

    - `-W help` 或 `--help`, `-W usage` 或 `--usage`:列出所有选项及其简短描述。 - `-W lint` 或 `--lint`:打印不可移植结构的警告。 - `-W posix`:启用POSIX兼容模式,限制某些特性以符合POSIX标准。 - `-W re-...

Global site tag (gtag.js) - Google Analytics