```erlang
file utilities, such as wildcard matching of filenames
filelib:ensure_dir( "test/c/a.txt" ). %在pwd()目录下查看是否存在存在该目录,如果不存在新建目录,不新建文件
filelib:file_size( "text.txt" ). 127
filelib:is_dir( "test/c" ). true
filelib:is_dir( "text.txt" ). false
filelib:is_file("test/c/"). true
filelib:is_file("text.txt").true
filelib:is_regular("log/ssl.log"). true
filelib:is_regular("log/"). false
filelib:last_modified("log/ssl.log"). {{2015,10,29},{17,51,38}}
filelib:wildcard("log/*"). ["log/ssl.log"]
filelib:wildcard("lib/*/ebin/*.beam").
filelib:wildcard("lib/*/src/*.?rl")
filelib:wildcard("lib/*/src/*.{erl,hrl}")
filelib:wildcard("lib/*/{src,include}/*.hrl").
filelib:wildcard("lib/*/{src,include}/*.{erl,hrl}")
filelib:wildcard("lib/**/*.{erl,hrl}")
? %Matches one character.
* %Matches any number of characters up to the end of the filename, the next dot, or the next slash.
** %Two adjacent *'s used as a single pattern will match all files and zero or more directories and subdirectories.
[Character1,Character2,...] %Matches any of the characters listed. Two characters separated by a hyphen will match a range of characters. Example: [A-Z] will match any uppercase letter.
{Item,...} %Alternation. Matches one of the alternatives.
filelib:wildcard("log/*", Cmd::dirname()).
```
- 1.学习
- 1.1安装与运行环境
- 1.2编辑器、集成开发环境与其它工具
- 1.3代码编译运行
- 2.基础
- 2.1 Erlang终端
- 2.2 基础语法
- 2.2.1 异常处理
- 2.3 数据类型
- 2.4 操作符
- 2.5 模块属性
- 3.库函数
- 3.1 常用模块
- 3.2 OTP模块
- 3.2.1 函数
- 3.2.2 receive
- 3.2.3 .app.src文件
- 3.2.4 _app.erl
- 3.2.5 _sup.erl
- 3.2.6 gen_server
- 3.2.7 gen_fsm
- 3.3 erts
- 3.3.1 init
- 3.3.2 BIF
- 3.3.3 NIF
- 3.4 kernel
- 3.4.1 code_server
- 3.4.2 inet
- 3.4.3 net_kernel
- 3.4.4 net_adm
- 3.4.5 error_logger
- 3.4.6 global
- 3.4.7 application
- 3.5 stdlib
- 3.5.2 array
- 3.5.4 base64
- 3.5.5 binary
- 3.5.6 c
- 3.5.8 calendar
- 3.5.9 code
- 3.5.11 dict
- 3.5.12 erl_
- 3.5.13 file
- 3.5.14 filelib
- 3.5.15 gb_trees
- 3.5.16 gb_sets
- 3.5.17 gen_tcp
- 3.5.18 gen_server
- 3.5.19 httpc
- 3.5.20 init_parse
- 3.5.21 init
- 3.5.22 inet
- 3.5.23 io
- 3.5.24 lists
- 3.5.25 maps
- 3.5.26 os
- 3.5.27 ordsets
- 3.5.28 proplists
- 3.5.29 queue
- 3.5.30 qlc
- 3.5.31 re
- 3.5.32 random
- 3.5.33 rfc4627-json
- 3.5.34 string
- 3.5.35 ssh
- 3.5.36 soft
- 3.5.37 sets
- 3.5.38 supervisor
- 3.5.39 tuple
- 3.5.40 timer
- 3.5.41 unicode
- 3.5.42 cpu
- 3.5.43 math
- 3.5.44 zip
- 3.5.45 shell
- 3.6 SASL
- 3.7 asn1
- 3.8 compiler
- 3.9 tools
- 3.10 OS_Mon
- 3.11 crypto
- 3.12 Port
- 4.工具
- 4.1 Erlang预处理器
- 4.2 Erlang节点
- 4.3 Erlang多节点
- 4.3.1主从节点
- 4.4 Epmd
- 4.5 断点工具
- 4.6 dialyzer
- 4.7 dbg-debug 模块
- 4.7.1 dbg
- 4.8 Erlang跟踪工具
- 4.9 etop
- 4.10 profiling
- 4.10.1 fprof
- 4.10.2 eprof
- 4.10.3 cprof
- 5.进阶
- 5.1 TCP粘包、大小端
- 5.2 rebar发布系统
- 5.3 ErlangVM 心跳
- 5.4 Erlang GC
- 5.5 Erlang Time
- 5.6 Erlang 启动
- 5.6.1 SASL配置
- 5.7 Erlang系统限制
- 6.项目
- 6.1 the_seed
- 6.2 network
- 6.3 parse_tool
- 6.4 cache
- 7.项目研究
- 7.1 Mnesia
- 7.1.1 Mnesia模式
- 7.1.2 Mnesia操作
- 7.1.3 Mnesia增删改查
- 7.1.4 Mnesia过载分析
- 7.1.5 Mnesia高级特性
- 7.1.6 分布式
- 7.1.7 Mnesia表分片
- 7.1.8 Mnesia锁
- 7.1.9 dets
- 7.1.10 ets
- 7.2 Ejabberd
- 7.2.1 mod_echo.erl
- 7.2.2 hooks for module developers
- 7.2.3 Events list
- 7.3 cowboy
- 7.4 rebar
- 7.4.1 rebar Wiki
- 7.4.2 rebar.config.script
- 7.5 RIAK CS
- 7.6 Leofs
- 7.6.1 简介
- 8.资料整理
- 8.1 资料
- 8.1.1 Erlang的调度原理
- 8.1.2 虚拟机代码执行原理
- 8.1.3 SMP
- 8.2 杂记
- 8.2.1 设计