feisty meow concerns codebase  2.140
filename_helper Namespace Reference

Functions

list glob_list (list original_names)
 #hmmm: make this lower-level, a script that is inherited by all perl scripts. More...
 
bool same_file (str file1, str file2)
 
list split_filename (str pathname)
 
str dirname (str pathname)
 
str basename (str pathname)
 
str extension (str pathname)
 
str non_extension (str pathname)
 
str remove_trailing_slashes (str pathname)
 
str directory_separator ()
 
str canonicalize (str pathname)
 
str native_canonicalize (str pathname)
 
str pc_canonicalize (str pathname)
 
str unix_canonicalize (str pathname)
 
str canonicalizer (str directory_name, str dirsep)
 

Variables

 name
 
 colon
 
 temp
 
 path
 

Detailed Description

Name   : filename helper
Author : Chris Koeritz
Rights : Copyright (C) 1996-$now by Author

Purpose:

  Functions that manipulate filenames in various helpful ways.

License:
This program is free software; you can redistribute it and/or modify it
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License or (at your option)
any later version.  See: "http://www.gruntose.com/Info/GNU/GPL.html" for a
version of the License.  Please send any updates to "fred@gruntose.com".

Function Documentation

◆ basename()

str filename_helper.basename ( str  pathname)

◆ canonicalize()

str filename_helper.canonicalize ( str  pathname)

Definition at line 215 of file filename_helper.py.

References canonicalizer().

Referenced by non_extension(), and split_filename().

◆ canonicalizer()

str filename_helper.canonicalizer ( str  directory_name,
str  dirsep 
)

◆ directory_separator()

str filename_helper.directory_separator ( )

Definition at line 205 of file filename_helper.py.

Referenced by native_canonicalize().

◆ dirname()

str filename_helper.dirname ( str  pathname)

Definition at line 151 of file filename_helper.py.

References split_filename().

◆ extension()

str filename_helper.extension ( str  pathname)

◆ glob_list()

list filename_helper.glob_list ( list  original_names)

#hmmm: make this lower-level, a script that is inherited by all perl scripts.

sub yeti_interrupt_handler { die "caught an interrupt; exiting."; }

hook in a ctrl-c catcher, since that seems to be universally needed. sub install_interrupt_catcher { $SIG{INT} = 'yeti_interrupt_handler'; $SIG{QUIT} = 'yeti_interrupt_handler'; print "mapped int and quit signals"; return 0 }

takes a set of filenames that may be relative (or really arcane) and globs them into a normal list of filenames.

Definition at line 46 of file filename_helper.py.

References split_filename().

Referenced by generate_aliases-new.rebuild_script_aliases().

◆ native_canonicalize()

str filename_helper.native_canonicalize ( str  pathname)

Definition at line 219 of file filename_helper.py.

References canonicalizer(), and directory_separator().

◆ non_extension()

str filename_helper.non_extension ( str  pathname)

Definition at line 175 of file filename_helper.py.

References canonicalize(), extension(), and remove_trailing_slashes().

◆ pc_canonicalize()

str filename_helper.pc_canonicalize ( str  pathname)

Definition at line 223 of file filename_helper.py.

References canonicalizer().

◆ remove_trailing_slashes()

str filename_helper.remove_trailing_slashes ( str  pathname)

Definition at line 186 of file filename_helper.py.

Referenced by non_extension(), and split_filename().

◆ same_file()

bool filename_helper.same_file ( str  file1,
str  file2 
)

Definition at line 111 of file filename_helper.py.

References stat.

◆ split_filename()

list filename_helper.split_filename ( str  pathname)

Definition at line 122 of file filename_helper.py.

References canonicalize(), and remove_trailing_slashes().

Referenced by basename(), dirname(), and glob_list().

◆ unix_canonicalize()

str filename_helper.unix_canonicalize ( str  pathname)

Definition at line 227 of file filename_helper.py.

References canonicalizer().

Variable Documentation

◆ colon

filename_helper.colon

Definition at line 297 of file filename_helper.py.

◆ name

◆ path

filename_helper.path

Definition at line 351 of file filename_helper.py.

◆ temp

filename_helper.temp

Definition at line 332 of file filename_helper.py.

Referenced by structures::static_memory_gremlin.__hoople_globals(), geometric::rectangle< numeric_type >.bottom_left(), geometric::rectangle< numeric_type >.bottom_right(), filesystem::directory_tree.compare_trees(), org.feistymeow.utility.Extemporizer.createTempDirectory(), structures.detach(), octopi::infoton.fast_pack(), structures::version.flex_text_form(), configuration::int_configlet.load(), geometric::angle< contents >.packed_size(), geometric::point< numeric_type >.packed_size(), geometric::rectangle< numeric_type >.packed_size(), filesystem::file_transfer_header.packed_size(), nechung_oracle.pick_random(), textual::byte_formatter.print_char(), manifest_chunk.read_a_filetime(), manifest_chunk.read_a_string(), manifest_chunk.read_an_int(), manifest_chunk.read_an_obscured_int(), manifest_chunk.read_manifest(), structures.rotate_in(), configuration::configurator.section_set(), algorithms.shell_sort(), processes::post_office.show_routes(), nodes::symbol_tree.sort(), processes::process_control.sort_by_name(), processes::process_control.sort_by_pid(), algorithms::heap< type >.swap_values(), algorithms.swap_values(), geometric::point< numeric_type >.text_form(), geometric::rectangle< numeric_type >.top_left(), geometric::rectangle< numeric_type >.top_right(), org.gffs.compression.UnpackTar.uncompressArchive(), filesystem::directory_tree.unpack(), filesystem::filename.unpack(), timely::day_in_year.unpack(), octopi::file_transfer_infoton.unpack(), and synchronic::synchronizable.unpack_mod().