file-ext

Crates.iofile-ext
lib.rsfile-ext
version12.0.0
sourcesrc
created_at2022-11-15 02:35:50.114334
updated_at2023-06-25 16:39:33.29286
descriptionCollection of utility functions to work with files
homepage
repositoryhttps://github.com/bohdaq/file-ext
max_upload_size
id715404
size141,140
Bohdan Tsap (bohdaq)

documentation

README

Welcome to file-ext!

Hi, file-ext is a collection of utility functions to work with files. It is tested and works on Linux, macOS and Windows.

Features

  1. File
    1. Read
    2. Read partially
    3. Does file exist
    4. Create
    5. Read file, if it doesn't exist create and write to file
    6. Write to file
    7. Delete
    8. Copy
  2. Directory
    1. Create
    2. Does directory exist
    3. Delete directory
  3. Path
    1. Absolute path to working directory
    2. Get OS dependent path separator ('/' on Unix, '\' on Windows)
    3. Get path to OS temporary folder ('/tmp' on Linux and macOS, 'C:\Users\username\AppData\Local\Temp' on Windows
  4. Symlink
    1. Does symlink exist
    2. Get path symlink points to
    3. Create symlink
  5. User
    1. Get the name of the user who is running the process
    2. Get domain user belongs to (available only on Windows)

Configuration

No additional configuration.

Demo

Take a look at mod.rs

Documentation

Take a look at mod.rs

Crate

Link to crate release.

Build

If you want to build file-ext on your own, make sure you have Rust installed.

$ cargo build

Test

If you want to test file-ext.

$ cargo test

Community

Use GitHub discussions, issues and pull requests.

There is Rust Web Server Discord where you can ask questions and share ideas.

Follow the Rust code of conduct.

Donations

Send me tips via PayPal.

Links

  1. Rust Web Server
  2. http-to-https-letsencrypt
  3. Rust Web Framework
  4. Create Debian Package
  5. Create RPM Package
  6. Homebrew Formula
Commit count: 225

cargo fmt