|
of_dirattribtods
|
|
Full name
|
pfc_n_cst_filesrv.of_dirattribtods
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_dirattribtods(ref n_ds,n_cst_dirattrib,string,integer)
|
Name
|
Datatype
|
ll_pos
|
long
|
ll_row
|
long
|
lnv_conv
|
n_cst_conversion
|
ls_ext
|
string
|
ls_name
|
string
|
protected function integer of_dirattribtods (ref n_ds ads_source, n_cst_dirattrib anv_entry, string as_sortfilename, integer ai_filegroup);//////////////////////////////////////////////////////////////////////////////
// Protected Function: of_DirAttribToDS
// Arguments: ads_source
// anv_entry
// as_sortfilename
// ai_filegroup
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
// Description:
//////////////////////////////////////////////////////////////////////////////
// Rev. History: Version
//////////////////////////////////////////////////////////////////////////////
// Copyright © 1996-1999 Sybase, Inc. and its subsidiaries. All rights reserved. Any distribution of the
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
long ll_row, ll_pos
string ls_ext, ls_name
n_cst_conversion lnv_conv
if (not isvalid(ads_source)) or isnull(ads_source) or &
(not isvalid(anv_entry)) or isnull(anv_entry) then
return -1
end if
if isnull(as_sortfilename) or isnull(ai_filegroup) then
return -1
end if
ll_Pos = Pos(as_sortfilename, ".")
If ll_Pos = 0 Or as_sortfilename = ".." Then
ls_Name = as_sortfilename
ls_Ext = ""
Else
ls_Name = Left(as_sortfilename, (ll_Pos - 1))
ls_Ext = Right(as_sortfilename, (Len(as_sortfilename) - ll_Pos))
End If
ll_row = ads_source.insertrow(0)
if ll_row < 0 then return -1
ads_source.object.filename[ll_row] = anv_entry.is_filename
ads_source.object.lastwritedate[ll_row] = anv_entry.id_lastwritedate
ads_source.object.lastwritetime[ll_row] = anv_entry.it_lastwritetime
ads_source.object.filesize[ll_row] = anv_entry.idb_filesize
ads_source.object.readonly[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_readonly, "ZEROONE"))
ads_source.object.system[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_system, "ZEROONE"))
ads_source.object.hidden[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_hidden, "ZEROONE"))
ads_source.object.subdirectory[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_subdirectory, "ZEROONE"))
ads_source.object.archive[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_archive, "ZEROONE"))
ads_source.object.drive[ll_row] = Integer(lnv_conv.of_string(anv_entry.ib_drive, "ZEROONE"))
ads_source.object.altfilename[ll_row] = anv_entry.is_altfilename
ads_source.object.creationdate[ll_row] = anv_entry.id_creationdate
ads_source.object.creationtime[ll_row] = anv_entry.it_creationtime
ads_source.object.lastaccessdate[ll_row] = anv_entry.id_lastaccessdate
ads_source.object.extension[ll_row] = ls_ext
ads_source.object.sortfilename[ll_row] = ls_name
ads_source.object.filegroup[ll_row] = ai_filegroup
return 1
end function
Name
|
Owner
|
datastore.insertrow |
datastore
|
systemfunctions.integer |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.left |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.pos |
systemfunctions
|
systemfunctions.right |
systemfunctions
|
pfc_n_cst_conversion.of_string |
pfc_n_cst_conversion
|