Rename os_agnostic.py to the more appropiate os_specifics
to encapsulate file system unique filename and path handling
This commit is contained in:
@@ -3,7 +3,7 @@ import os
|
|||||||
from document_indexing.conf.settings import SUFFIX_SEPARATOR
|
from document_indexing.conf.settings import SUFFIX_SEPARATOR
|
||||||
|
|
||||||
|
|
||||||
def assemble_document_filename(filename, suffix=0):
|
def assemble_suffixed_filename(filename, suffix=0):
|
||||||
'''
|
'''
|
||||||
Split document filename, to attach suffix to the name part then
|
Split document filename, to attach suffix to the name part then
|
||||||
re attacht the extension
|
re attacht the extension
|
||||||
@@ -14,3 +14,7 @@ def assemble_document_filename(filename, suffix=0):
|
|||||||
return SUFFIX_SEPARATOR.join([name, unicode(suffix), os.extsep, extension])
|
return SUFFIX_SEPARATOR.join([name, unicode(suffix), os.extsep, extension])
|
||||||
else:
|
else:
|
||||||
return file_filename
|
return file_filename
|
||||||
|
|
||||||
|
|
||||||
|
def assemble_path_from_list(directory_list):
|
||||||
|
return os.sep.join(directory_list)
|
||||||
Reference in New Issue
Block a user