filepaths

package
v0.5.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 5 Imported by: 0

README

サンプルリスト

このディレクトリには以下のサンプルがあります。

file example name note
filepath_walk.go filepath_walk filepaths.Walk() のサンプルです.
filepath_glob.go filepath_glob filepath.Glob() の動作についてのサンプルです.
exclude_suffix.go filepath_exclude_suffix ファイル名から拡張子を除いた値を取得するサンプルです.

Documentation

Overview

Package filepaths -- path/filepath パッケージに関するサンプルが配置されているパッケージです。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExcludeSuffix added in v0.5.34

func ExcludeSuffix() error

ExcludeSuffix は、ファイル名から拡張子を除いた値を取得するサンプルです.

filepath.Ext()とstrings.TrimSuffix()を組み合わせて取得出来ます。

> strings.TrimSuffix(file, filepath.Ext(file))

または、スライスを拡張子分だけカットすることでも取得出来ます。

> file[:len(file)-len(filepath.Ext(file))]

REFERENCES

func FilePathGlob

func FilePathGlob() error

FilePathGlob は、 filepath.Glob() の動作についてのサンプルです.

https://golang.org/path/filepath/#Glob

func FilePathWalk

func FilePathWalk() error

FilePathWalk は、filepaths.Walk() のサンプルです.

func NewRegister

func NewRegister() mapping.Register

NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL