• Jump To … +
    assert_Array.litcoffee assert_Boolean.litcoffee assert_Function.litcoffee assert_Number.litcoffee assert_Object.litcoffee assert_String.litcoffee fluentnode.coffee index.md Array.litcoffee Boolean.litcoffee Function.litcoffee Number.litcoffee Object.litcoffee String.litcoffee console.litcoffee crypto.litcoffee fs.litcoffee http.GET.litcoffee http.POST.litcoffee http.Server.litcoffee http.litcoffee path.litcoffee process.litcoffee encoding.litcoffee globals.litcoffee assert_Array.test.coffee assert_Boolean.test.coffee assert_Function.test.coffee assert_Number.test.coffee assert_Object.test.coffee assert_String.test.coffee fluentnode.test.coffee Array.test.coffee Boolean.test.coffee Function.test.coffee Number.test.coffee Object.test.coffee String.test.coffee console.test.coffee crypto.test.coffee fs.test.coffee http.GET.test.coffee http.POST.test.coffee http.Server.test.coffee http.test.coffee path.test.coffee process.test.coffee encoding.test.coffee globals.test.coffee
  • path.litcoffee

  • ¶
    path = require('path')
  • ¶

    @.path_Combine

    String::path_Combine = (pathToAppend) ->
      if pathToAppend then path.join(@.toString(), pathToAppend) else @.toString()
  • ¶

    @.file_Dir_Name

    twin methods: file_Parent_Folder, parent_Folder

    String::file_Dir_Name  = () ->
      path.dirname @
    
    String::file_Parent_Folder = String::file_Dir_Name
    String::parent_Folder      = String::file_Dir_Name
  • ¶

    @.file_Extension

    String::file_Extension = () ->
      path.extname(@.toString())
  • ¶

    @.file_Name

    String::file_Name = () ->
      path.basename @.toString()
  • ¶

    @.file_Names

    Array::file_Names = () ->
      file.file_Name() for file in @
  • ¶

    @.append_To_Process_Cwd_Path

    String::append_To_Process_Cwd_Path  = () ->
      process.cwd().path_Combine(@.toString())
  • ¶

    @.file_Name_Without_Extension

    String::file_Name_Without_Extension  = () ->
      path.basename @.toString()
                     .replace(@.toString().file_Extension(), "")
  • ¶

    @.file_Names_Without_Extension

    Array:: file_Names_Without_Extension  = () ->
      file.file_Name_Without_Extension() for file in @
  • ¶

    @.folder_Name

    Returns the name of the current folder (which is the right-most segment of a path)

    If you want the full path, use the parent_Folder method

    String::folder_Name = ()->
      @.valueOf().file_Name()
  • ¶

  • ¶

    back to index